1

Topic: Relay mails using IP address of receiving servers instead mx records

Hi,

We have mailing list where t external users are part of it. Here is a scenario

our mail server domain is domain.in & there is an another mail server ( not in our network ) domain.com

we created mailing list i.e. maillist@domain.in having users from domain.in & domain.com. when we send mail to maillist@domain.in, it works well and deliver to all the users in domain.in but mails are not getting delivered to domain.com as their server treats relay as spam.

We worked with other team ans they suggested, relay mails to specific IP instead sending to MX record. we tried following article

http://www.lynty.com/index.php/postfix/ … relay-host

Here are the steps we followed

Howto relay mails for specific domains (like local ones), or which is 'global mx.records' are different from your want to relay mail
something like in microsoft exghange server 'connectors'
so for this propose, you could use /etc/postfix/transport file

somedomain.com    smtp:[10.0.0.1]:25

DONT FORGET TO:
postmap hash:/etc/postfix/transport

but unfortunately mail is still going as per the mx record.

we restarted postfix but in vain.

Are we missing something.

Thanks in advance for the help.

Regards,

PineMail11

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Relay mails using IP address of receiving servers instead mx records

iRedMail doesn't use /etc/postfix/transport by default, you have to add it manually like below:

# Default transport maps:
# transport_maps = proxy:ldap:/etc/postfix/ldap/transport_maps_user.cf, proxy:ldap:/etc/postfix/ldap/transport_maps_domain.cf

# New:
transport_maps = hash:/etc/postfix/tarnsport, proxy:ldap:/xxx.cf, proxy:ldap:/yyy.cf

3

Re: Relay mails using IP address of receiving servers instead mx records

Perfect!!

Just now also we could figure out the changes in main.cf

Here are the details what we followed

Routing specific domain destinations via the outgoing smarthost:

In order to do this, you should add a line to /etc/postfix/transport:

example.com smtp:[1.1.1.1]:587
After you've made your changes, you should generate a postmap file using:

postmap hash:/etc/postfix/transport

In order for Postfix to use the transport file, you should add or edit a line in /etc/postfix/main.cf:

transport_maps = hash:/etc/postfix/transport

Afterwards you should restart Postfix and all mail or the mail for selected domains should go trough the Smarthost.

Thanks a lot!

Regards,

PineMail11