1

Topic: Tries to send from @127.0.0.1 instead of @mydomain.com

==== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Raspbian
- Related log if you're reporting an issue:
====

I'm currently setting up iRedMail and attempted to compose and send a test e-mail. However, when I click Compose, it lists my From address as netrin@127.0.0.1 instead of netrin@mydomain.com. Does anyone know why it does this?

If I attempt to click Send anyway, the error is:
SMTP Error (501): Failed to set sender "netrin@127.0.0.1" (5.1.7 Bad sender address syntax).

Any help would be appreciated.

2

Re: Tries to send from @127.0.0.1 instead of @mydomain.com

Which mail composer do you use? You have to specify a correct From address in your mail client.

3 (edited by netrin 2014-08-11 20:55:26)

Re: Tries to send from @127.0.0.1 instead of @mydomain.com

Hey thanks for the quick reply. That attempt was through Roundcube. Shouldn't it display netrin@mydomain.com instead of netrin@127.0.0.1 in the top right of Roundcube, regardless or Thunderbird settings? Makes me think it's a deeper settings issue.

All I can think of is that I have not done anything related to DNS_SPF or DNS_DKIM. Could that be the problem? (I don't know what those do... but I do have a static IP set up). Perhaps there's something in a config that needs to be changed, or something in the web-based interface? I couldn't see anything.

hostname: mail
hostname -f: mail.mydomain.com
Also added ServerName mydomain.com to the Apache2 files.

Please let me know if any other config files would be helpful.

4 (edited by netrin 2014-08-13 03:02:47)

Re: Tries to send from @127.0.0.1 instead of @mydomain.com

After spending a lot of time reading and playing with the config files, still no luck: in Roundcube it still says netrin@127.0.0.1 instead of netrin@mydomain.com and I cannot send or receive mail. Sorry to bump, but any suggestions?

Found some info in/var/mail/mail.log that looks strange--does this help us understand the problem at all?

Aug 12 14:36:01 mail postfix/pipe[6610]: 351117F8AF: to=<postmaster@mydomain.net>, relay=dovecot, delay=13071, delays=13069/1.1/0/0.45, dsn=4.3.0, status=deferred (temporary failure)
Aug 12 14:36:01 mail postfix/smtp[6599]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Aug 12 14:36:01 mail postfix/smtp[6607]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Aug 12 14:36:01 mail postfix/smtp[6599]: 958E07F8BC: to=<root@mail.mydomain.net>, relay=none, delay=9359, delays=9357/1.5/0.12/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Aug 12 14:36:01 mail postfix/smtp[6607]: E42437F8AE: to=<root@mail.mydomain.net>, relay=none, delay=12959, delays=12958/1.5/0.12/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Aug 12 14:36:01 mail postfix/error[6619]: 495AD7FB21: to=<root@mail.mydomain.net>, relay=none, delay=2159, delays=2158/1.7/0/0.03, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Aug 12 14:39:04 mail postfix/pickup[5757]: 795967FB2E: uid=0 from=<root>
Aug 12 14:39:04 mail postfix/cleanup[6643]: 795967FB2E: message-id=<20140812183904.795967FB2E@mail.mydomain.net>
Aug 12 14:39:04 mail postfix/qmgr[3861]: 795967FB2E: from=<root@mail.mydomain.net>, size=830, nrcpt=1 (queue active)
Aug 12 14:39:04 mail postfix/error[6645]: 795967FB2E: to=<root@mail.mydomain.net>, relay=none, delay=0.38, delays=0.29/0.03/0/0.05, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Aug 12 14:39:21 mail postfix/scache[6618]: statistics: start interval Aug 12 14:36:01
Aug 12 14:39:21 mail postfix/scache[6618]: statistics: domain lookup hits=0 miss=2 success=0%
Aug 12 14:39:21 mail postfix/scache[6618]: statistics: address lookup hits=0 miss=2 success=0%
Aug 12 14:40:02 mail postfix/pickup[5757]: 233D280391: uid=109 from=<smmsp>
Aug 12 14:40:02 mail postfix/cleanup[6643]: 233D280391: message-id=<20140812184002.233D280391@mail.mydomain.net>
Aug 12 14:40:02 mail postfix/qmgr[3861]: 233D280391: from=<smmsp@mail.mydomain.net>, size=696, nrcpt=1 (queue active)
Aug 12 14:40:02 mail postfix/error[6645]: 233D280391: to=<root@mail.mydomain.net>, relay=none, delay=0.27, delays=0.21/0/0/0.05, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Aug 12 14:45:58 mail postfix/qmgr[3861]: 840DD7F8B2: from=<>, size=2892, nrcpt=1 (queue active)
Aug 12 14:45:58 mail postfix/qmgr[3861]: 795967FB2E: from=<root@mail.mydomain.net>, size=830, nrcpt=1 (queue active)
Aug 12 14:45:58 mail postfix/qmgr[3861]: 95D657FB2B: from=<>, size=2558, nrcpt=1 (queue active)
Aug 12 14:45:58 mail postfix/qmgr[3861]: 9DC1D7FB0F: from=<root@mail.mydomain.net>, size=830, nrcpt=1 (queue active)
Aug 12 14:45:58 mail postfix/qmgr[3861]: C01007F8B1: from=<root@mail.mydomain.net>, size=830, nrcpt=1 (queue active)
Aug 12 14:45:58 mail postfix/qmgr[3861]: CB7697F8A8: from=<smmsp@mail.mydomain.net>, size=696, nrcpt=1 (queue active)
Aug 12 14:45:58 mail postfix/qmgr[3861]: 233D280391: from=<smmsp@mail.mydomain.net>, size=696, nrcpt=1 (queue active)
Aug 12 14:45:58 mail postfix/qmgr[3861]: 37BF67FB2C: from=<root@mail.mydomain.net>, size=830, nrcpt=1 (queue active)
Aug 12 14:45:59 mail postfix/smtp[7114]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Aug 12 14:45:59 mail postfix/smtp[7114]: 795967FB2E: to=<root@mail.mydomain.net>, relay=none, delay=415, delays=414/0.24/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Aug 12 14:45:59 mail postfix/smtp[7117]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Aug 12 14:45:59 mail postfix/smtp[7117]: 9DC1D7FB0F: to=<root@mail.mydomain.net>, relay=none, delay=9415, delays=9414/0.47/0.01/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Aug 12 14:45:59 mail postfix/local[7115]: 95D657FB2B: to=<smmsp@mail.mydomain.net>, relay=local, delay=2400, delays=2399/0.32/0/0.38, dsn=4.3.0, status=deferred (temporary failure. Command output: Can't open log file /var/log/dovecot-sieve.log: Permission denied )
Aug 12 14:45:59 mail postfix/pipe[7113]: 840DD7F8B2: to=<postmaster@mydomain.net>, relay=dovecot, delay=17269, delays=17268/0.44/0/0.68, dsn=4.3.0, status=deferred (temporary failure)
Aug 12 14:45:59 mail postfix/qmgr[3861]: 840DD7F8B2: from=<>, status=expired, returned to sender
Aug 12 14:45:59 mail postfix/qmgr[3861]: 840DD7F8B2: removed
Aug 12 14:45:59 mail postfix/smtp[7114]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Aug 12 14:45:59 mail postfix/smtp[7117]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Aug 12 14:45:59 mail postfix/smtp[7114]: C01007F8B1: to=<root@mail.mydomain.net>, relay=none, delay=13016, delays=13015/0.61/0.17/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Aug 12 14:45:59 mail postfix/smtp[7117]: CB7697F8A8: to=<root@mail.mydomain.net>, relay=none, delay=17158, delays=17157/0.62/0.16/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Aug 12 14:45:59 mail postfix/qmgr[3861]: CB7697F8A8: from=<smmsp@mail.mydomain.net>, status=expired, returned to sender
Aug 12 14:45:59 mail postfix/error[7125]: 233D280391: to=<root@mail.mydomain.net>, relay=none, delay=358, delays=357/0.87/0/0.1, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Aug 12 14:45:59 mail postfix/error[7127]: 37BF67FB2C: to=<root@mail.mydomain.net>, relay=none, delay=2216, delays=2215/0.92/0/0.06, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Aug 12 14:45:59 mail postfix/cleanup[7126]: E41247F8B2: message-id=<20140812184559.E41247F8B2@mail.mydomain.net>
Aug 12 14:46:00 mail postfix/qmgr[3861]: E41247F8B2: from=<>, size=2558, nrcpt=1 (queue active)
Aug 12 14:46:00 mail postfix/bounce[7118]: CB7697F8A8: sender non-delivery notification: E41247F8B2
Aug 12 14:46:00 mail postfix/qmgr[3861]: CB7697F8A8: removed
Aug 12 14:46:00 mail postfix/local[7115]: E41247F8B2: to=<smmsp@mail.mydomain.net>, relay=local, delay=0.5, delays=0.33/0/0/0.17, dsn=4.3.0, status=deferred (temporary failure. Command output: Can't open log file /var/log/dovecot-sieve.log: Permission denied )

Not sure if this helps, but I also noticed that when logged in as postmaster, a few root e-mails appeared and were from root@mail.mydomain.com . Is this typical or should it be from root@mydomain.com instead?

5

Re: Tries to send from @127.0.0.1 instead of @mydomain.com

netrin wrote:

After spending a lot of time reading and playing with the config files, still no luck: in Roundcube it still says netrin@127.0.0.1 instead of netrin@mydomain.com and I cannot send or receive mail. Sorry to bump, but any suggestions?

Do you login with 'netrin' and not 'netrin@mydomain.com'? Does it work if you login with full email address as username?
Also, what's the value of below Roundcube setting in /usr/share/apache2/roundcubemail/config/config.main.inc:

$config['username_domain'] = '';
netrin wrote:

Aug 12 14:36:01 mail postfix/smtp[6599]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused

Amavisd service is not running.

netrin wrote:

Aug 12 14:46:00 mail postfix/local[7115]: E41247F8B2: to=<smmsp@mail.mydomain.net>, relay=local, delay=0.5, delays=0.33/0/0/0.17, dsn=4.3.0, status=deferred (temporary failure. Command output: Can't open log file /var/log/dovecot-sieve.log: Permission denied )

Incorrect file permission, it should be owned by "vmail:vmail", permission 0600.

6 (edited by netrin 2014-08-15 11:43:03)

Re: Tries to send from @127.0.0.1 instead of @mydomain.com

Got Amavis running and corrected the file permission. Thank you! Here is the setting you asked about:

//$config['username_domain'] = '';
$config['identities_level'] = 3;
$config['mime_types'] = '/etc/mime.types';

It seems that my Gmail account now accepts e-mails from the iRedMail server (yay!) but that all of my other clients give the "Undelivered Mail Returned to Sender" e-mail (darn!):

<username@popularmailservice.net>: host mx1.popularmailservice.net[yyy.yyy.yyy.yyy] said: 554 5.7.1
    Service unavailable; Client host xxx.xxx.xxx.xxx blocked using
    zen.spamhaus.org; http://www.spamhaus.org/query/bl?ip=xxx.xxx.xxx.xxx (in
    reply to RCPT TO command)

<different@mailservice.com>: host boss10.us.messagelabs.com[zzz.zzz.zzz.zzz]
    said: 553-mail rejected because your IP is in the PBL. See 553
    http://www.spamhaus.org/pbl/ (in reply to RCPT TO command)

^ That probably deserves a separate thread, because I'm not at all clear on what this means after searching around and need to look into it further. But how is it that Google will receive e-mails while my other accounts will not accept them?

Would the zone file I configured on gandi.net have any bearing on this issue, or does that have nothing to do with it? Here it is, in case it's helpful:

mail 10800 IN A xxx.xxx.xxx.xxx
@ 10800 IN MX 10 mydomain.net.
@ 10800 IN SPF "v=spf1 ip4:xxx.xxx.xxx.xxx -all"
dkim._domainkey.mydomain.net 10800 IN TXT "v=DKIM1; p=MIGfMA0GCSqlaakjdfjakh88937gaoiudf9874guaykdfhadgfverylongstringoflettersandnumbersandplussignsuiohr897aoufafaadfadf"

7

Re: Tries to send from @127.0.0.1 instead of @mydomain.com

netrin wrote:

Got Amavis running and corrected the file permission. Thank you! Here is the setting you asked about:

//$config['username_domain'] = '';

So you have empty value for this setting and login with username, not full email address?

<different@mailservice.com>: host boss10.us.messagelabs.com[zzz.zzz.zzz.zzz]
    said: 553-mail rejected because your IP is in the PBL. See 553
    http://www.spamhaus.org/pbl/ (in reply to RCPT TO command)

It's clear in this message, please go to www.spamhaus.org to request to remove your IP from PBL.

8

Re: Tries to send from @127.0.0.1 instead of @mydomain.com

ZhangHuangbin wrote:
netrin wrote:

Got Amavis running and corrected the file permission. Thank you! Here is the setting you asked about:

//$config['username_domain'] = '';

So you have empty value for this setting and login with username, not full email address?

<different@mailservice.com>: host boss10.us.messagelabs.com[zzz.zzz.zzz.zzz]
    said: 553-mail rejected because your IP is in the PBL. See 553
    http://www.spamhaus.org/pbl/ (in reply to RCPT TO command)

It's clear in this message, please go to www.spamhaus.org to request to remove your IP from PBL.

I log into Roundcube and Thunderbird with the full address e.g. netrin@mydomain.com

Regarding Spamhaus, how do I know that whatever got me banned in the first place has been fixed and that I won't just be banned again? It seems to have to do with SMTP Authentication. Is there something in the configuration files that I failed to modify to allow this?

9 (edited by netrin 2014-08-17 02:33:26)

Re: Tries to send from @127.0.0.1 instead of @mydomain.com

Well, I did make a few changes to get AUTH PLAIN LOGIN to show up in a telnet ehlo response. This seems helpful, but I'm still listed on the Spamhaus block list, which is apparently prohibiting me from sending mails from my server to anything but Gmail.

I noticed that in the various config files for dovecot and postfix, one or two of the paths for:
/var/spool/postfix/private/dovecot-auth
instead showed
/var/spool/postfix/private/auth
so I changed those to the former.

I also changed
auth_mechanisms = plain
to
auth_mechanisms = PLAIN LOGIN
where ever I encountered it.
*shrug*

Here is the Telnet response:

root@mail ~ # telnet mail smtp
Trying 127.0.1.1...
Connected to mail.mydomain.net.
Escape character is '^]'.
220 mail.mydomain.net ESMTP Postfix (Debian/GNU)
ehlo mail.mydomain.net
250-mail.mydomain.net
250-PIPELINING
250-SIZE 15728640
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

So I think that's a good thing, right? Later I looked up my IP on the Spamhaus Policy Block List (PBL) and found this information:

xxx.xxx.xxx.xxx/16 is listed on the Policy Block List (PBL)

Outbound Email Policy of <MY ISP> for this IP range:
It is the policy of <MY ISP> to share with other entities lists of our dynamic IP address space. While <MY ISP> does not currently forbid customers from sending out mail directly from such space, it recognizes that others may wish to refuse mail from such space, and so <MY ISP> makes that space known to others to facilitate their enforcement of their policies. Customers finding their mail refused by others due to a PBL listing should send their outbound mail through the outbound mail server designated for them; see http://<broken link to ISP website> for more information on the servers' names.

Removal Procedure
Removal of IP addresses within this range from the PBL is not allowed by the netblock owner's policy.

Does this mean it's hopeless, then? It seems that I am expressly prohibited from running my own iRedMail server from home, or something.

I'm kind of stumped and ready to give up, because I've spent an insane amount of time looking into this and everything seems correct, but it still won't work. I feel like I'm up against this PBL now, but please advise, if you have experience dealing with these issues. Otherwise I will have to abandon the project, which would be sad, because it seemed so promising sad

10

Re: Tries to send from @127.0.0.1 instead of @mydomain.com

netrin wrote:

I also changed
auth_mechanisms = plain
to
auth_mechanisms = PLAIN LOGIN

'PLAIN LOGIN' is default setting configured by iRedMail. I guess you changed too many parameters in Dovecot and Postfix. Could you please show us output of below commands?

# postconf -n
# dovecot -n

11

Re: Tries to send from @127.0.0.1 instead of @mydomain.com

Thank you so much for your continued help! Here are the outputs:

postconf -n

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_min_user = no
allow_percent_hack = no
append_dot_mydomain = no
biff = no
bounce_queue_lifetime = 4h
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
delay_warning_time = 0h
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
enable_original_recipient = no
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = ipv4
mailbox_command = /usr/lib/dovecot/deliver
mailbox_size_limit = 0
maximal_backoff_time = 4000s
maximal_queue_lifetime = 4h
message_size_limit = 15728640
minimal_backoff_time = 300s
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhost                      name
mydomain = mydomain.net
myhostname = mail.mydomain.net
mynetworks = 127.0.0.0/8
mynetworks_style = host
myorigin = mail.mydomain.net
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $myde                      stination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domai                      ns $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps                       $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_doma                      ins $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_se                      nder_restrictions
queue_run_delay = 300s
readme_directory = no
recipient_bcc_maps = proxy:ldap:/etc/postfix/ldap/recipient_bcc_maps_user.cf, pr                      oxy:ldap:/etc/postfix/ldap/recipient_bcc_maps_domain.cf
recipient_delimiter = +
relay_domains = $mydestination, proxy:ldap:/etc/postfix/ldap/relay_domains.cf
relayhost =
sender_bcc_maps = proxy:ldap:/etc/postfix/ldap/sender_bcc_maps_user.cf, proxy:ld                      ap:/etc/postfix/ldap/sender_bcc_maps_domain.cf
smtp-amavis_destination_recipient_limit = 1
smtp_data_init_timeout = 240s
smtp_data_xfer_timeout = 600s
smtp_tls_CAfile = $smtpd_tls_CAfile
smtp_tls_loglevel = 0
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10031
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_n                      on_fqdn_helo_hostname, reject_invalid_helo_hostname, check_helo_access pcre:/etc                      /postfix/helo_access.pcre
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_reci                      pient_domain, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unlisted                      _recipient, check_policy_service inet:127.0.0.1:7777, check_policy_service inet:                      127.0.0.1:10031, permit_mynetworks, permit_sasl_authenticated, reject_unauth_des                      tination
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = private/dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = proxy:ldap:/etc/postfix/ldap/sender_login_maps.cf
smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, per                      mit_sasl_authenticated
smtpd_tls_CAfile = /etc/ssl/certs/iRedMail_CA.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/certs/iRedMail_CA.pem
smtpd_tls_key_file = /etc/ssl/private/iRedMail.key
smtpd_tls_loglevel = 0
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
swap_bangpath = no
tls_random_source = dev:/dev/urandom
transport_maps = proxy:ldap:/etc/postfix/ldap/transport_maps_user.cf, proxy:ldap                      :/etc/postfix/ldap/transport_maps_domain.cf
virtual_alias_domains =
virtual_alias_maps = proxy:ldap:/etc/postfix/ldap/virtual_alias_maps.cf, proxy:l                      dap:/etc/postfix/ldap/virtual_group_maps.cf, proxy:ldap:/etc/postfix/ldap/virtua                      l_group_members_maps.cf, proxy:ldap:/etc/postfix/ldap/catchall_maps.cf
virtual_gid_maps = static:2000
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:ldap:/etc/postfix/ldap/virtual_mailbox_domains.c                      f
virtual_mailbox_maps = proxy:ldap:/etc/postfix/ldap/virtual_mailbox_maps.cf
virtual_minimum_uid = 2000
virtual_transport = dovecot
virtual_uid_maps = static:2000

dovecot -n

# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.12.22+ armv6l Debian 7.6
auth_master_user_separator = *
auth_mechanisms = PLAIN LOGIN
dict {
  acl = mysql:/etc/dovecot/dovecot-share-folder.conf
  quotadict = mysql:/etc/dovecot/dovecot-used-quota.conf
}
first_valid_uid = 2000
last_valid_uid = 2000
listen = *
log_path = /var/log/dovecot.log
mail_gid = 2000
mail_location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/
mail_plugins = quota
mail_uid = 2000
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
namespace {
  inbox = yes
  location =
  mailbox {
    auto = subscribe
    special_use = \Drafts
    name = Drafts
  }
  mailbox {
    auto = subscribe
    special_use = \Junk
    name = Junk
  }
  mailbox {
    auto = subscribe
    special_use = \Sent
    name = Sent
  }
  mailbox {
    auto = no
    special_use = \Sent
    name = Sent Messages
  }
  mailbox {
    auto = no
    special_use = \Junk
    name = Spam
  }
  mailbox {
    auto = subscribe
    special_use = \Trash
    name = Trash
  }
  prefix =
  separator = /
  type = private
  name =
}
namespace {
  list = children
  location = maildir:/%%Lh/Maildir/:INDEX=/%%Lh/Maildir/Shared/%%u
  prefix = Shared/%%u/
  separator = /
  subscriptions = yes
  type = shared
  name =
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
passdb {
  args = /etc/dovecot/dovecot-master-users-password
  driver = passwd-file
  master = yes
}
plugin {
  acl = vfile
  acl_shared_dict = proxy::acl
  auth_socket_path = /var/run/dovecot/auth-master
  quota = dict:user::proxy::quotadict
  quota_rule = *:storage=1G
  quota_warning = storage=85%% quota-warning 85 %u
  quota_warning2 = storage=90%% quota-warning 90 %u
  quota_warning3 = storage=95%% quota-warning 95 %u
  sieve = /%Lh/sieve/dovecot.sieve
  sieve_default = /var/vmail/sieve/dovecot.sieve
  sieve_dir = /%Lh/sieve
  sieve_global_dir = /var/vmail/sieve
}
protocols = imap
service replication-notify-fifo {
  name = aggregator
}
service anvil-auth-penalty {
  name = anvil
}
service auth-worker {
  name = auth-worker
}
service {
  unix_listener {
    group = postfix
    mode = 0660
    user = postfix
    path = /var/spool/postfix/private/dovecot-auth
  }
  unix_listener {
    group = vmail
    mode = 0666
    user = vmail
    path = auth-master
  }
  unix_listener {
    group = vmail
    mode = 0660
    user = vmail
    path = auth-userdb
  }
  name = auth
}
service config {
  name = config
}
service {
  unix_listener {
    group = vmail
    mode = 0660
    user = vmail
    path = dict
  }
  name = dict
}
service login/proxy-notify {
  name = director
}
service dns-client {
  name = dns_client
}
service doveadm-server {
  name = doveadm
}
service imap {
  process_limit = 500
  service_count = 1
  name = imap-login
}
service login/imap {
  name = imap
}
service indexer-worker {
  name = indexer-worker
}
service indexer {
  name = indexer
}
service ipc {
  name = ipc
}
service {
  executable = lmtp -L
  inet_listener {
    port = 24
    name = lmtp
  }
  process_min_avail = 5
  unix_listener {
    group = postfix
    mode = 0600
    user = postfix
    path = /var/spool/postfix/private/dovecot-lmtp
  }
  user = vmail
  name = lmtp
}
service log-errors {
  name = log
}
service sieve {
  name = managesieve-login
}
service login/sieve {
  name = managesieve
}
service pop3 {
  service_count = 1
  name = pop3-login
}
service login/pop3 {
  name = pop3
}
service {
  executable = script /usr/local/bin/dovecot-quota-warning.sh
  unix_listener {
    group = vmail
    mode = 0660
    user = vmail
    path = quota-warning
  }
  name = quota-warning
}
service replicator {
  name = replicator
}
service login/ssl-params {
  name = ssl-params
}
service stats-mail {
  name = stats
}
ssl = required
ssl_cert = </etc/ssl/certs/iRedMail_CA.pem
ssl_key = </etc/ssl/private/iRedMail.key
userdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  lda_mailbox_autocreate = yes
  log_path = /var/log/dovecot-sieve.log
  mail_plugins = quota sieve
  postmaster_address = root
  service replication-notify-fifo {
    name = aggregator
  }
  service anvil-auth-penalty {
    name = anvil
  }
  service auth-worker {
    name = auth-worker
  }
  service auth-client {
    name = auth
  }
  service config {
    name = config
  }
  service dict {
    name = dict
  }
  service login/proxy-notify {
    name = director
  }
  service dns-client {
    name = dns_client
  }
  service doveadm-server {
    name = doveadm
  }
  service imap {
    name = imap-login
  }
  service login/imap {
    name = imap
  }
  service indexer-worker {
    name = indexer-worker
  }
  service indexer {
    name = indexer
  }
  service ipc {
    name = ipc
  }
  service lmtp {
    name = lmtp
  }
  service log-errors {
    name = log
  }
  service sieve {
    name = managesieve-login
  }
  service login/sieve {
    name = managesieve
  }
  service pop3 {
    name = pop3-login
  }
  service login/pop3 {
    name = pop3
  }
  service replicator {
    name = replicator
  }
  service login/ssl-params {
    name = ssl-params
  }
  service stats-mail {
    name = stats
  }
}
protocol lmtp {
  info_log_path = /var/log/dovecot-lmtp.log
  lmtp_save_to_detail_mailbox = yes
  mail_plugins = quota sieve
  postmaster_address = postmaster
  recipient_delimiter = +
  service replication-notify-fifo {
    name = aggregator
  }
  service anvil-auth-penalty {
    name = anvil
  }
  service auth-worker {
    name = auth-worker
  }
  service auth-client {
    name = auth
  }
  service config {
    name = config
  }
  service dict {
    name = dict
  }
  service login/proxy-notify {
    name = director
  }
  service dns-client {
    name = dns_client
  }
  service doveadm-server {
    name = doveadm
  }
  service imap {
    name = imap-login
  }
  service login/imap {
    name = imap
  }
  service indexer-worker {
    name = indexer-worker
  }
  service indexer {
    name = indexer
  }
  service ipc {
    name = ipc
  }
  service lmtp {
    name = lmtp
  }
  service log-errors {
    name = log
  }
  service sieve {
    name = managesieve-login
  }
  service login/sieve {
    name = managesieve
  }
  service pop3 {
    name = pop3-login
  }
  service login/pop3 {
    name = pop3
  }
  service replicator {
    name = replicator
  }
  service login/ssl-params {
    name = ssl-params
  }
  service stats-mail {
    name = stats
  }
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep
  mail_plugins = quota imap_quota
  service replication-notify-fifo {
    name = aggregator
  }
  service anvil-auth-penalty {
    name = anvil
  }
  service auth-worker {
    name = auth-worker
  }
  service auth-client {
    name = auth
  }
  service config {
    name = config
  }
  service dict {
    name = dict
  }
  service login/proxy-notify {
    name = director
  }
  service dns-client {
    name = dns_client
  }
  service doveadm-server {
    name = doveadm
  }
  service imap {
    name = imap-login
  }
  service login/imap {
    name = imap
  }
  service indexer-worker {
    name = indexer-worker
  }
  service indexer {
    name = indexer
  }
  service ipc {
    name = ipc
  }
  service lmtp {
    name = lmtp
  }
  service log-errors {
    name = log
  }
  service sieve {
    name = managesieve-login
  }
  service login/sieve {
    name = managesieve
  }
  service pop3 {
    name = pop3-login
  }
  service login/pop3 {
    name = pop3
  }
  service replicator {
    name = replicator
  }
  service login/ssl-params {
    name = ssl-params
  }
  service stats-mail {
    name = stats
  }
}
protocol pop3 {
  mail_plugins = quota
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
  service replication-notify-fifo {
    name = aggregator
  }
  service anvil-auth-penalty {
    name = anvil
  }
  service auth-worker {
    name = auth-worker
  }
  service auth-client {
    name = auth
  }
  service config {
    name = config
  }
  service dict {
    name = dict
  }
  service login/proxy-notify {
    name = director
  }
  service dns-client {
    name = dns_client
  }
  service doveadm-server {
    name = doveadm
  }
  service imap {
    name = imap-login
  }
  service login/imap {
    name = imap
  }
  service indexer-worker {
    name = indexer-worker
  }
  service indexer {
    name = indexer
  }
  service ipc {
    name = ipc
  }
  service lmtp {
    name = lmtp
  }
  service log-errors {
    name = log
  }
  service sieve {
    name = managesieve-login
  }
  service login/sieve {
    name = managesieve
  }
  service pop3 {
    name = pop3-login
  }
  service login/pop3 {
    name = pop3
  }
  service replicator {
    name = replicator
  }
  service login/ssl-params {
    name = ssl-params
  }
  service stats-mail {
    name = stats
  }
}

12

Re: Tries to send from @127.0.0.1 instead of @mydomain.com

*) Postfix config looks fine.
*) Looks like you have more settings in Dovecot config. You can compare iRedMail default Dovecot setting with our sample file:
https://bitbucket.org/zhb/iredmail/src/ … at=default

13

Re: Tries to send from @127.0.0.1 instead of @mydomain.com

Ok, I'll have a careful look at the differences between the two files. Much appreciated. You do an excellent job, ZhangHuangbin, and this kind of attention and assistance is incredibly kind.