1

Topic: ALL mail goes out via relayhost, NO local host delivery

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5.1
- Linux/BSD distribution name and version: Centos 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

Hello,

I have been watching my maillog, and I see that mydomain.local emails are getting are getting routed to my ISP and then back trhu fetchmail.

this is part of main.cf
smtp_sender_dependent_authentication = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_type = cyrus
smtp_sasl_mechanism_filter = login
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
smtp_always_send_ehlo = yes
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_generic_maps = hash:/etc/postfix/generic
relayhost = [mail.serverpro.mx]:26

my generic file maps user@domain.local user@ispmail.com


the only thing that is relay annoying is that local email has to travel to ISP.  the main purpose of this server is to handle ALL local emails

Thanks in advance to everyone!
rtrevino

----

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

2

Re: ALL mail goes out via relayhost, NO local host delivery

You can try steps below, but i didn't try it myself before. If you got issue, post here.

*) Open file /etc/postfix/master.cf, find a line which starts with "pickup ...".
*) Add a line RIGHT AFTER "pickup ..." line:

  -o relayhost=

The final setting is:

pickup ...
   -o relayhost=

Note: "relayhost=" sets the relayhost to empty value, it should get local emails delivered locally.