Re: postfix can't send and receive mails
--- tôba <toba@tsepa.net> wrote:
- snip -
> > But mail sent on Gmail to satimis@satimis.com has been rejected.
> >
> >
> > # tail /var/log/mail.log
> > Nov 10 16:35:16 xen05 postfix/cleanup[2898]: 490F07829B:
> > message-id=<20081110151802.C6E94782F5@xen05.satimis.com>
> > Nov 10 16:35:16 xen05 postfix/smtpd[2896]: disconnect from
> > localhost.localdomain[127.0.0.1]
> > Nov 10 16:35:16 xen05 amavis[2418]: (02418-03) FWD via SMTP:
> > <amavis@xen05.satimis.com> -> <amavis@xen05.satimis.com>, 250 2.6.0
> > Ok, id=02418-03, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued
> as
> > 490F07829B
> > Nov 10 16:35:16 xen05 postfix/qmgr[2746]: 490F07829B:
> > from=<amavis@xen05.satimis.com>, size=1176, nrcpt=1 (queue active)
> > Nov 10 16:35:16 xen05 amavis[2418]: (02418-03) Passed CLEAN,
> > <amavis@xen05.satimis.com> -> <amavis@xen05.satimis.com>,
> Message-ID:
> > <20081110151802.C6E94782F5@xen05.satimis.com>, mail_id:
> FDLLpb2+oHHy,
> > Hits: -, queued_as: 490F07829B, 495 ms
> > Nov 10 16:35:16 xen05 amavis[2418]: (02418-03) TIMING [total 506
> ms] -
> > SMTP EHLO: 19 (4%)4, SMTP pre-MAIL: 1 (0%)4, SMTP pre-DATA-flush: 8
> > (2%)5, SMTP DATA: 28 (6%)11, body_digest: 7 (1%)13, gen_mail_id: 2
> > (0%)13, mime_decode: 37 (7%)20, get-file-type1: 42 (8%)28,
> > decompose_part: 2 (0%)29, parts_decode: 0 (0%)29, update_cache: 13
> > (3%)31, decide_mail_destiny: 1 (0%)31, fwd-connect: 180 (36%)67,
> > fwd-mail-from: 67 (13%)80, fwd-rcpt-to: 24 (5%)85, fwd-data-cmd: 1
> > (0%)85, write-header: 1 (0%)86, fwd-data-contents: 0 (0%)86,
> > fwd-data-end: 33 (7%)92, fwd-rundown: 1 (0%)93, prepare-dsn: 7
> (1%)94,
> > main_log_entry: 20 (4%)98, update_snmp: 7 (1%)99, unlink-1-files: 3
> > (1%)100, rundown: 1 (0%)100
> > Nov 10 16:35:16 xen05 postfix/smtp[2894]: C6E94782F5:
> > to=<amavis@xen05.satimis.com>, orig_to=<amavis>,
> > relay=127.0.0.1[127.0.0.1]:10024, delay=4634,
> > delays=4633/0.01/0.03/0.49, dsn=2.6.0, status=sent (250 2.6.0 Ok,
> > id=02418-03, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as
> > 490F07829B)
> > Nov 10 16:35:16 xen05 postfix/qmgr[2746]: C6E94782F5: removed
> > Nov 10 16:35:16 xen05 postfix/local[2899]: 490F07829B:
> > to=<root@xen05.satimis.com>, orig_to=<amavis@xen05.satimis.com>,
> > relay=local, delay=0.13, delays=0.07/0.05/0/0, dsn=2.0.0,
> status=sent
> > (delivered to mailbox)
> > Nov 10 16:35:16 xen05 postfix/qmgr[2746]: 490F07829B: removed
>
> So, I think your postfix works, your amavis works according the
> logs.
> But I do not see the gmail rejected related log?
> I think you have to review your rules. Maybe they are too strict if
> mails from gmail are rejected?
Yes, you're right, incoming mail stopped by Shorewall without registry
on mail.log.
Ran;
xen05:~# /etc/init.d/shorewall stop
Sent a mail on Yahoo to satimis@satimis.com. The mail was rejected as
well.
# tail /var/log/mail.log
Nov 11 02:38:34 xen05 postfix/anvil[3266]: statistics: max cache size 1
at Nov 11 02:35:38
Nov 11 02:39:15 xen05 postfix/master[2745]: reload configuration
/etc/postfix
Nov 11 02:41:53 xen05 postfix/smtpd[3445]: warning: 121.34.170.57:
hostname 57.170.34.121.broad.sz.gd.dynamic.163data.com.cn verification
failed: Name or service not known
Nov 11 02:41:53 xen05 postfix/smtpd[3445]: connect from
unknown[121.34.170.57]
Nov 11 02:41:55 xen05 postfix/smtpd[3445]: NOQUEUE: reject: RCPT from
unknown[121.34.170.57]: 554 5.7.1 <mail@satimis.com>: Relay access
denied; from=<mail@satimis.com> to=<mail@satimis.com> proto=ESMTP
helo=<57.170.34.121.broad.sz.gd.dynamic.163data.com.cn>
Nov 11 02:41:55 xen05 postfix/smtpd[3445]: lost connection after RCPT
from unknown[121.34.170.57]
Nov 11 02:41:55 xen05 postfix/smtpd[3445]: disconnect from
unknown[121.34.170.57]
Nov 11 02:45:15 xen05 postfix/anvil[3446]: statistics: max connection
rate 1/60s for (smtp:121.34.170.57) at Nov 11 02:41:53
Nov 11 02:45:15 xen05 postfix/anvil[3446]: statistics: max connection
count 1 for (smtp:121.34.170.57) at Nov 11 02:41:53
Nov 11 02:45:15 xen05 postfix/anvil[3446]: statistics: max cache size 1
at Nov 11 02:41:53
I have been googling a while without solution discovered. The cause is
supposed to be no relay_domains defined.
# postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
delay_warning_time = 4h
disable_vrfy_command = yes
inet_interfaces = all
local_recipient_maps =
mailbox_size_limit = 0
masquerade_exceptions = root
maximal_backoff_time = 8000s
maximal_queue_lifetime = 7d
minimal_backoff_time = 1000s
mydestination = xen05.satimis.com, localhost.satimis.com, , localhost
myhostname = xen05.satimis.com
mynetworks = 127.0.0.0/8
mynetworks_style = host
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtp_helo_timeout = 60s
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org,
reject_rbl_client dnsbl.njabl.org
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_delay_reject = yes
smtpd_hard_error_limit = 12
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, warn_if_reject
reject_non_fqdn_hostname, reject_invalid_hostname, permit
smtpd_recipient_limit = 16
smtpd_recipient_restrictions = reject_unauth_pipelining,
permit_mynetworks, reject_non_fqdn_recipient,
reject_unknown_recipient_domain, reject_unauth_destination,
check_policy_service inet:127.0.0.1:60000, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_sasl_authenticated,
permit_mynetworks, reject_non_fqdn_sender,
reject_unknown_sender_domain, reject_unauth_pipelining, permit
smtpd_soft_error_limit = 3
smtpd_tls_cert_file = /etc/postfix/postfix.cert
smtpd_tls_key_file = /etc/postfix/postfix.key
smtpd_tls_session_cache_database =
btree:${queue_directory}/smtpd_scache
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 450
virtual_alias_maps = mysql:/etc/postfix/mysql_alias.cf
virtual_gid_maps = mysql:/etc/postfix/mysql_gid.cf
virtual_mailbox_base = /var/spool/mail/virtual
virtual_mailbox_domains = mysql:/etc/postfix/mysql_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_mailbox.cf
virtual_uid_maps = mysql:/etc/postfix/mysql_uid.cf
# cat /etc/postfix/mysql_domains.cf
user=mail
password=mymailpass
dbname=maildb
table=domains
select_field=domain
where_field=domain
hosts=127.0.0.1
additional_conditions = and enabled = 1
# mysql -u root -p
mysql> USE maildb;
mysql> show tables;
+------------------+
| Tables_in_maildb |
+------------------+
| aliases |
| domains |
| users |
+------------------+
3 rows in set (0.00 sec)
mysql> SELECT * from domains;
+------+-----------------------+-----------+---------+
| pkid | domain | transport | enabled |
+------+-----------------------+-----------+---------+
| 1 | localhost | virtual: | 1 |
| 2 | localhost.localdomain | virtual: | 1 |
| 3 | satimis.com.tld | virtual: | 1 |
+------+-----------------------+-----------+---------+
3 rows in set (0.00 sec)
Whether it just needs "satimis.com" dropping ".tld"-top_level_domain ?
mysql> SELECT * from users;
+---------------------+---------+------+------+-------------------------+----------+---------+-----------------+------------+---------------+-------+------------+----------------+
| id | name | uid | gid | home
| maildir | enabled | change_password | clear | crypt |
quota | procmailrc | spamassassinrc |
+---------------------+---------+------+------+-------------------------+----------+---------+-----------------+------------+---------------+-------+------------+----------------+
| root@localhost | root | 5000 | 5000 | /var/spool/mail/virtual
| root/ | 1 | 1 | x05root | sdtrusfX0Jj66 |
| | |
| satimis@satimis.com | Stephen | 5000 | 5000 | /var/spool/mail/virtual
| Stephen/ | 1 | 1 | x05satimis | sdtrusfX0Jj66 |
| | |
+---------------------+---------+------+------+-------------------------+----------+---------+-----------------+------------+---------------+-------+------------+----------------+
2 rows in set (0.00 sec)
# /home/satimis/postfinger
postfinger - postfix configuration on Tue Nov 11 04:50:52 UTC 2008
version: 1.30
- snip -
--master.cf--
smtp inet n - n - - smtpd
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
587 inet n - n - - smtpd
-o smtpd_enforce_tls=yes
-o smtpd_sasl_auth_enable=yes
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - n 300 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
-o fallback_relay=
showq unix n - - - - showq
error unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender
$recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o strict_rfc821_envelopes=yes
-o mynetworks=127.0.0.0/8
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1001
pre-cleanup unix n - - - 0 cleanup
-o virtual_alias_maps=
-o canonical_maps=
-o sender_canonical_maps=
-o recipient_canonical_maps=
-o masquerade_domains=
-- end of postfinger output --
B.R.
Stephen L
Send instant messages to your online friends http://uk.messenger.yahoo.com
Reply to: