I would like to get some insight as to the cause and correct
configuration to use. Building a new server that in part is my postfix
server and spent the last couple of days pulling my hair out trying to
get it to deliver mail.
I have an existing postfix server that has been working since 2014 maybe
even back to 2011. I basically set up this new server exactly how the
old one is set up. So this is not a newbie asking for help. The fix I
finally figured out boggles my mind.
The problem was handing messages off to localhost:10025 for spamassassin
to scan before delivery, every attempt to do so was denied. Below is an
explanation of what I found what I finally did to get it to work. If
configs, logs, anything else is needed to diagnose this let me know,
there's already a lot here so I figured i'd wait before I add more.
When "inet_protocols = all" the connection to filter.mynetwork.local
localhost
port 10025 to hand off the message to spamassassin for scanning fails with
"Relay access denied". What I finally noticed is that the connection in
coming
from "localhost[::1]" a ipv6 connection.
So on a long-shot I changed "inet_protocols = ipv4" and then delivery
worked.
Jun 27 00:00:01 cjbnew*mydomain postfix/smtpd[20766]: connect from
localhost[::1]
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: <
127.0.0.1[127.0.0.1]:10025: 220 filter.mynetwork.local ESMTP
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: >
127.0.0.1[127.0.0.1]:10025: EHLO mydomain.com
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: <
127.0.0.1[127.0.0.1]:10025: 250-filter.mynetwork.local
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: <
127.0.0.1[127.0.0.1]:10025: 250-PIPELINING
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: <
127.0.0.1[127.0.0.1]:10025: 250-SIZE
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: <
127.0.0.1[127.0.0.1]:10025: 250-ETRN
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: <
127.0.0.1[127.0.0.1]:10025: 250-ENHANCEDSTATUSCODES
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: <
127.0.0.1[127.0.0.1]:10025: 250-8BITMIME
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: <
127.0.0.1[127.0.0.1]:10025: 250-DSN
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: <
127.0.0.1[127.0.0.1]:10025: 250-SMTPUTF8
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: <
127.0.0.1[127.0.0.1]:10025: 250 CHUNKING
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: server features:
0x20900f size 0
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: Using ESMTP
PIPELINING, TCP send buffer size is 2626560, PIPELINING buffer size is 4096
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: smtp_stream_setup:
maxtime=300 enable_deadline=0 min_data_rate=0
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: >
127.0.0.1[127.0.0.1]:10025: MAIL FROM:<r...@mydomain.com> SIZE=426
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: >
127.0.0.1[127.0.0.1]:10025: RCPT TO:<bobby....@gmail.com>
ORCPT=rfc822;bobby....@gmail.com
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: >
127.0.0.1[127.0.0.1]:10025: DATA
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: smtp_stream_setup:
maxtime=300 enable_deadline=0 min_data_rate=0
Jun 27 00:00:01 cjbnew*mydomain postfix/smtpd[20770]: connect from
localhost[::1]
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: <
127.0.0.1[127.0.0.1]:10025: 220 filter.mynetwork.local ESMTP
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: >
127.0.0.1[127.0.0.1]:10025: EHLO mydomain.com
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: <
127.0.0.1[127.0.0.1]:10025: 250-filter.mynetwork.local
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: <
127.0.0.1[127.0.0.1]:10025: 250-PIPELINING
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: <
127.0.0.1[127.0.0.1]:10025: 250-SIZE
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: <
127.0.0.1[127.0.0.1]:10025: 250-ETRN
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: <
127.0.0.1[127.0.0.1]:10025: 250-ENHANCEDSTATUSCODES
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: <
127.0.0.1[127.0.0.1]:10025: 250-8BITMIME
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: <
127.0.0.1[127.0.0.1]:10025: 250-DSN
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: <
127.0.0.1[127.0.0.1]:10025: 250-SMTPUTF8
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: <
127.0.0.1[127.0.0.1]:10025: 250 CHUNKING
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: server features:
0x20900f size 0
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: Using ESMTP
PIPELINING, TCP send buffer size is 2626560, PIPELINING buffer size is 4096
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: smtp_stream_setup:
maxtime=300 enable_deadline=0 min_data_rate=0
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: >
127.0.0.1[127.0.0.1]:10025: MAIL FROM:<r...@mydomain.com> SIZE=417
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: >
127.0.0.1[127.0.0.1]:10025: RCPT TO:<BobbyJoe@cjbnew>
ORCPT=rfc822;BobbyJoe@cjbnew
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: >
127.0.0.1[127.0.0.1]:10025: DATA
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: smtp_stream_setup:
maxtime=300 enable_deadline=0 min_data_rate=0
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: <
127.0.0.1[127.0.0.1]:10025: 250 2.1.0 Ok
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20757]: smtp_stream_setup:
maxtime=300 enable_deadline=0 min_data_rate=0
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: <
127.0.0.1[127.0.0.1]:10025: 250 2.1.0 Ok
Jun 27 00:00:01 cjbnew*mydomain postfix/smtp[20763]: smtp_stream_setup:
maxtime=300 enable_deadline=0 min_data_rate=0
Jun 27 00:00:01 cjbnew*mydomain postfix/smtpd[20766]: NOQUEUE: reject:
RCPT from localhost[::1]: 454 4.7.1 <bobby....@gmail.com>: Relay access
denied; from=<r...@mydomain.com> to=<bobby....@gmail.com> proto=ESMTP
helo=<mydomain.com>
Jun 27 00:00:01 cjbnew*mydomain postfix/smtpd[20770]: NOQUEUE: reject:
RCPT from localhost[::1]: 454 4.7.1 <BobbyJoe@cjbnew>: Relay access
denied; from=<r...@mydomain.com> to=<BobbyJoe@cjbnew> proto=ESMTP
helo=<mydomain.com>
With "inet_protocols = ipv4" the connection comes from "[127.0.0.1]"
ipv4 and then delivery works.
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: connect from
localhost.localdomain[127.0.0.1]
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: smtp_stream_setup:
maxtime=300 enable_deadline=0 min_data_rate=0
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: match_hostname:
smtpd_client_event_limit_exceptions: localhost.localdomain ~? 127.0.0.0/8
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: match_hostaddr:
smtpd_client_event_limit_exceptions: 127.0.0.1 ~? 127.0.0.0/8
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: dict_cidr_lookup:
/etc/postfix/discard_ehlo_keyword: 127.0.0.1
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: maps_find:
smtpd_discard_ehlo_keyword_address_maps:
cidr:/etc/postfix/discard_ehlo_keyword(0,lock): 127.0.0.1 = silent-discard
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: name_mask:
silent-discard
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: >
localhost.localdomain[127.0.0.1]: 220 filter.mynetwork.local ESMTP
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]:
xsasl_cyrus_server_create: SASL service=smtp, realm=(null)
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: name_mask: noanonymous
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: match_string:
smtpd_sasl_mechanism_filter: plain ~? external
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: match_string:
smtpd_sasl_mechanism_filter: plain ~? static:rest(0,lock|utf8_request)
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: sasl_mech_filter:
keep SASL mechanism: 'PLAIN'
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: match_string:
smtpd_sasl_mechanism_filter: login ~? external
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: match_string:
smtpd_sasl_mechanism_filter: login ~? static:rest(0,lock|utf8_request)
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: sasl_mech_filter:
keep SASL mechanism: 'LOGIN'
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: smtp_stream_setup:
maxtime=300 enable_deadline=0 min_data_rate=0
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: watchdog_pat:
0x55817c292810
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: <
127.0.0.1[127.0.0.1]:10025: 220 filter.mynetwork.local ESMTP
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: >
127.0.0.1[127.0.0.1]:10025: EHLO mydomain.com
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: <
localhost.localdomain[127.0.0.1]: EHLO mydomain.com
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: match_hostname:
smtpd_sasl_exceptions_networks: localhost.localdomain ~? 127.0.0.0/8
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: match_hostaddr:
smtpd_sasl_exceptions_networks: 127.0.0.1 ~? 127.0.0.0/8
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: sasl_exceptions:
localhost.localdomain[127.0.0.1], match=0
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: match_list_match:
localhost.localdomain: no match
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: match_list_match:
127.0.0.1: no match
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: >
localhost.localdomain[127.0.0.1]: 250-filter.mynetwork.local
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: >
localhost.localdomain[127.0.0.1]: 250-PIPELINING
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: >
localhost.localdomain[127.0.0.1]: 250-SIZE
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: >
localhost.localdomain[127.0.0.1]: 250-ETRN
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: >
localhost.localdomain[127.0.0.1]: 250-AUTH PLAIN LOGIN
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: >
localhost.localdomain[127.0.0.1]: 250-ENHANCEDSTATUSCODES
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: >
localhost.localdomain[127.0.0.1]: 250-8BITMIME
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: >
localhost.localdomain[127.0.0.1]: 250-DSN
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: >
localhost.localdomain[127.0.0.1]: 250-SMTPUTF8
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: >
localhost.localdomain[127.0.0.1]: 250 CHUNKING
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: smtp_stream_setup:
maxtime=300 enable_deadline=0 min_data_rate=0
Jun 27 22:42:10 cjbnew*mydomain postfix/smtpd[8351]: watchdog_pat:
0x55817c292810
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: <
127.0.0.1[127.0.0.1]:10025: 250-filter.mynetwork.local
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: <
127.0.0.1[127.0.0.1]:10025: 250-PIPELINING
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: <
127.0.0.1[127.0.0.1]:10025: 250-SIZE
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: <
127.0.0.1[127.0.0.1]:10025: 250-ETRN
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: <
127.0.0.1[127.0.0.1]:10025: 250-AUTH PLAIN LOGIN
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: <
127.0.0.1[127.0.0.1]:10025: 250-ENHANCEDSTATUSCODES
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: <
127.0.0.1[127.0.0.1]:10025: 250-8BITMIME
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: <
127.0.0.1[127.0.0.1]:10025: 250-DSN
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: <
127.0.0.1[127.0.0.1]:10025: 250-SMTPUTF8
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: <
127.0.0.1[127.0.0.1]:10025: 250 CHUNKING
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: server features:
0x20900f size 0
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: Using ESMTP
PIPELINING, TCP send buffer size is 2626560, PIPELINING buffer size is 4096
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: smtp_stream_setup:
maxtime=300 enable_deadline=0 min_data_rate=0
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: >
127.0.0.1[127.0.0.1]:10025: MAIL FROM:<r...@mydomain.com> SIZE=426
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: >
127.0.0.1[127.0.0.1]:10025: RCPT TO:<bobby....@gmail.com>
ORCPT=rfc822;bobby....@gmail.com
Jun 27 22:42:10 cjbnew*mydomain postfix/smtp[8344]: >
127.0.0.1[127.0.0.1]:10025: DATA
The message was successfully transferred for spamassassin scanning and
subsequently
then delivered.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org