Topic: Added Let's Encrypt all works, but sendmail from mx server is rejected
============ Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5
- Linux/BSD distribution name and version: CentOS release 6.7 (Final)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====
Hi,
I installed Let's Encrypt about a month ago on my iRedMail server. I just upgraded today to 0.9.5 to see if that fixed it. I used this web site as a guide to install Let's Encrypt: http://www.dsp3.org/integrating-lets-en … -iredmail/
Everything works including sendmail from other servers, with the exception of sending emails (logwatch, sendmail) from the mail server. Logwatch and sendmail used to work before I installed Let's Encrypt, and I have tried to retrace my steps to fix it, but I can't seem to find the problem. I have tried changes in /etc/postfix/main.cf (hostname/mydestination), with no luck.
Below are logs and config files
For this example, (to avoid spam), I have done a search for my domain name and replaced it with "<mydomain>"
parts of /etc/httpd/conf.d/ssl.conf:
SSLCertificateFile /etc/letsencrypt/live/mx.<mydomain>.com/cert.pem
# Server Private Key:
# If the key is not combined with the certificate, use this
# directive to point at the key file. Keep in mind that if
# you've both a RSA and a DSA private key you can configure
# both in parallel (to also allow the use of DSA ciphers, etc.)
SSLCertificateKeyFile /etc/letsencrypt/live/mx.<mydomain>.com/privkey.pem
Alias /cluebringer "/usr/share/cluebringer/webui/"
Alias /iredadmin/static "/var/www/iredadmin/static/"
WSGIScriptAlias /iredadmin "/var/www/iredadmin/iredadmin.py/"
Alias /mail "/var/www/roundcubemail/"
Alias /awstats/icon "/usr/share/awstats/wwwroot/icon/"
Alias /awstatsicon "/usr/share/awstats/wwwroot/icon/"
ScriptAlias /awstats "/usr/share/awstats/wwwroot/cgi-bin/"
parts of /etc/postfix/main.cf
readme_directory = /usr/share/doc/postfix-2.11.0/README_FILES
inet_protocols = all
virtual_alias_domains =
myhostname = mx.<mydomain>.com
myorigin = mx.<mydomain>.com
allow_percent_hack = no
swap_bangpath = no
mydomain = <mydomain>.com
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
biff = no
inet_interfaces = all
mynetworks = 127.0.0.0/8, 192.168.1.0/28
mynetworks_style = host
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = yes
smtpd_tls_protocols = !SSLv2 !SSLv3
smtp_tls_protocols = !SSLv2 !SSLv3
lmtp_tls_protocols = !SSLv2 !SSLv3
smtpd_tls_mandatory_protocols = !SSLv2 !SSLv3
smtp_tls_mandatory_protocols = !SSLv2 !SSLv3
lmtp_tls_mandatory_protocols = !SSLv2 !SSLv3
smtp_tls_security_level = may
smtp_tls_CAfile = $smtpd_tls_CAfile
smtp_tls_loglevel = 0
smtp_tls_note_starttls_offer = yes
smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated, check_sender_access pcre:/etc/postfix/sender_access.pcre
delay_warning_time = 0h
maximal_queue_lifetime = 4h
bounce_queue_lifetime = 4h
recipient_delimiter = +
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps
smtp_data_init_timeout = 240s
smtp_data_xfer_timeout = 600s
smtpd_helo_required = yessmtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, check_helo_access pcre:/etc/postfix/helo_access.pcre
queue_run_delay = 300s
minimal_backoff_time = 300s
maximal_backoff_time = 4000s
enable_original_recipient = no
disable_vrfy_command = yes
home_mailbox = Maildir/
allow_min_user = no
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
message_size_limit = 15728640
virtual_minimum_uid = 2000
virtual_uid_maps = static:2000
virtual_gid_maps = static:2000
virtual_mailbox_base = /home/vmail
transport_maps = proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf, proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_maps.cfvirtual_alias_maps = proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf, proxy:mysql:/etc/postfix/mysql/domain_alias_maps.cf, proxy:mysql:/etc/postfix/mysql/catchall_maps.cf, proxy:mysql:/etc/postfix/mysql/domain_alias_catchall_maps.cf
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf, proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_domain.cf
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_user.cf, proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_domain.cf
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql/relay_domains.cf
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql/sender_login_maps.cf
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymoussmtpd_tls_auth_only = yessmtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unlisted_recipient, check_policy_service inet:127.0.0.1:7777, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:7777,
smtpd_tls_security_level = may
smtpd_tls_loglevel = 0smtpd_tls_key_file = /etc/letsencrypt/live/mx.<mydomain>.com/privkey.pem
smtpd_tls_cert_file = /etc/letsencrypt/live/mx.<mydomain>.com/cert.pem
smtpd_tls_CAfile = /etc/letsencrypt/live/mx.<mydomain>.com/chain.pem
tls_random_source = dev:/dev/urandom
mailbox_command = /usr/libexec/dovecot/deliver
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/dovecot-auth
content_filter = smtp-amavis:[127.0.0.1]:10024
smtp-amavis_destination_recipient_limit = 1
smtpd_tls_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA
smtpd_tls_dh1024_param_file = /etc/pki/tls/dhparams.pem
sender_dependent_relayhost_maps = proxy:mysql:/etc/postfix/mysql/sender_dependent_relayhost_maps.cf
/var/log/maillog:
May 3 13:34:50 mx sendmail[23232]: u43JYjso023232: from=root, size=6, class=0, nrcpts=1, msgid=<201605031934.u43JYjso023232@mx.<mydomain>.com>, relay=root@localhost
May 3 13:34:50 mx postfix/smtpd[22646]: connect from localhost[127.0.0.1]
May 3 13:34:50 mx sendmail[23232]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256/256
May 3 13:34:50 mx postfix/smtpd[22646]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <<myEmail>@mx.<mydomain>.com>: Recipient address rejected: User unknown in local recipient table; from=<root@mx.<mydomain>.com> to=<<myEmail>@mx.<mydomain>.com> proto=ESMTP helo=<mx.<mydomain>.com>
May 3 13:34:50 mx sendmail[23232]: u43JYjso023232: to=<myEmail>@<mydomain>.com, ctladdr=root (0/0), delay=00:00:05, xdelay=00:00:00, mailer=relay, pri=30006, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
May 3 13:34:50 mx sendmail[23232]: u43JYjso023232: u43JYjsp023232: DSN: User unknown
May 3 13:34:50 mx postfix/smtpd[22646]: E28C8120315: client=localhost[127.0.0.1]
May 3 13:34:50 mx postfix/cleanup[22504]: E28C8120315: message-id=<201605031934.u43JYjsp023232@mx.<mydomain>.com>
May 3 13:34:50 mx sendmail[23232]: u43JYjsp023232: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31030, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as E28C8120315)
May 3 13:34:50 mx postfix/qmgr[1704]: E28C8120315: from=<>, size=2372, nrcpt=1 (queue active)
May 3 13:34:51 mx postfix/smtpd[22646]: disconnect from localhost[127.0.0.1]
May 3 13:35:05 mx postfix/smtpd[22961]: connect from localhost[127.0.0.1]
May 3 13:35:05 mx postfix/smtpd[22961]: C22FE120318: client=localhost[127.0.0.1]
May 3 13:35:05 mx postfix/cleanup[22504]: C22FE120318: message-id=<201605031934.u43JYjsp023232@mx.<mydomain>.com>
May 3 13:35:05 mx postfix/smtpd[22961]: disconnect from localhost[127.0.0.1]
May 3 13:35:05 mx postfix/qmgr[1704]: C22FE120318: from=<>, size=3009, nrcpt=1 (queue active)
May 3 13:35:05 mx postfix/cleanup[22504]: D02C4120428: message-id=<201605031934.u43JYjsp023232@mx.<mydomain>.com>
May 3 13:35:05 mx amavis[1795]: (01795-12) Passed CLEAN {RelayedInternal}, MYNETS LOCAL [127.0.0.1]:39272 [127.0.0.1] <> -> <root@mx.<mydomain>.com>, Queue-ID: E28C8120315, Message-ID: <201605031934.u43JYjsp023232@mx.<mydomain>.com>, mail_id: fP8I6cxiH7qA, Hits: -2.889, size: 2371, queued_as: C22FE120318, 14870 ms
May 3 13:35:05 mx postfix/local[23064]: C22FE120318: to=<root@mx.<mydomain>.com>, relay=local, delay=0.12, delays=0.05/0.01/0/0.07, dsn=2.0.0, status=sent (forwarded as D02C4120428)
May 3 13:35:05 mx postfix/qmgr[1704]: D02C4120428: from=<>, size=3133, nrcpt=1 (queue active)
May 3 13:35:05 mx postfix/qmgr[1704]: C22FE120318: removed
May 3 13:35:05 mx postfix/smtp[22509]: E28C8120315: to=<root@mx.<mydomain>.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=15, delays=0.06/0/0/15, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as C22FE120318)
May 3 13:35:05 mx postfix/qmgr[1704]: E28C8120315: removed
May 3 13:35:06 mx postfix/pipe[22962]: D02C4120428: to=<<myEmail>@<mydomain>.com>, relay=dovecot, delay=0.29, delays=0.06/0/0/0.23, dsn=2.0.0, status=sent (delivered via dovecot service)
May 3 13:35:06 mx postfix/qmgr[1704]: D02C4120428: removed
May 3 13:35:08 mx postfix/anvil[18962]: statistics: max connection rate 2/60s for (smtp:173.208.164.164) at May 3 13:26:55
May 3 13:35:08 mx postfix/anvil[18962]: statistics: max connection count 2 for (smtp:173.208.164.164) at May 3 13:26:55
May 3 13:35:08 mx postfix/anvil[18962]: statistics: max cache size 3 at May 3 13:33:31
Any help would be appreciated!
Thanks!
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.