[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: postfix can't send and receive mails (SOLVED) - resend



Hi lee,


Your advice solves my pending problem.  Thanks.


I'm following this howto;

http://flurdy.com/docs/postfix/edition5.html

building postfix virtual which is my goal.  This is my 5th round.  All
previous tests failed (following other howto NOT relating to this
howto).


> On Wed, 12 Nov 2008 14:57:54 +0800 (CST)
> Stephen Liu <satimis@yahoo.com> wrote:
> 
> > # grep relayhost /etc/postfix/main.cf
> > relayhost =
> 
> Ok, I guess that would mean that there are no hosts specified for
> which
> xen05 is allowed to relay mail.
> 
> > comment out that line 'mydestination';
> 
> http://www.postfix.org/basic.html says:
> 
>   "The mydestination parameter specifies what domains this machine
> will
>    deliver locally, instead of forwarding to another machine. The
> default
>    is to receive mail for the machine itself."
> 
> See also the examples for the default on that page. I don't know what
> exactly you are trying to do --- if you only want to send and recieve
> mail from and to users on xen05, the default for mydestination should
> suffice.
> 
> But if you are trying to have mail for users at another domain
> (satimis.com is another domain) delivered locally, you need to
> specify
> that domain as one of the domains given in mydestination. For
> example:
> 
> mydestination = $myhostname, localhost.$mydomain, localhost,
> satimis.com


The above advice works seamlessly.  Incoming mails arrive.


Made following tests;


1)
Sent a mail on Gmail to satimis@satimis.com.  Mail arrived, being
delivered to /var/spool/mail/satimis file


# tail /var/log/mail.log
Nov 12 12:41:31 xen05 postfix/cleanup[3176]: 757D9782F6:
message-id=<ca46cd50811120436y6d0bba2dn793632580b8febba@mail.gmail.com>
Nov 12 12:41:31 xen05 postfix/smtpd[3180]: disconnect from
localhost.localdomain[127.0.0.1]
Nov 12 12:41:31 xen05 postfix/qmgr[2884]: 757D9782F6:
from=<satimisliu@gmail.com>, size=2221, nrcpt=1 (queue active)
Nov 12 12:41:31 xen05 amavis[2419]: (02419-01) FWD via SMTP:
<satimisliu@gmail.com> -> <satimis@satimis.com>, 250 2.6.0 Ok,
id=02419-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as
757D9782F6
Nov 12 12:41:32 xen05 postfix/local[3182]: 757D9782F6:
to=<satimis@satimis.com>, relay=local, delay=0.58,
delays=0.08/0.37/0/0.14, dsn=2.0.0, status=sent (delivered to mailbox)
Nov 12 12:41:32 xen05 postfix/qmgr[2884]: 757D9782F6: removed
Nov 12 12:41:32 xen05 amavis[2419]: (02419-01) Passed CLEAN,
[74.125.44.152] [74.125.44.152] <satimisliu@gmail.com> ->
<satimis@satimis.com>, Message-ID:
<ca46cd50811120436y6d0bba2dn793632580b8febba@mail.gmail.com>, mail_id:
12vF5yRxczq8, Hits: -, queued_as: 757D9782F6, 1722 ms
Nov 12 12:41:32 xen05 amavis[2419]: (02419-01) TIMING [total 1736 ms] -
SMTP EHLO: 341 (20%)20, SMTP pre-MAIL: 1 (0%)20, mkdir tempdir: 15
(1%)21, create email.txt: 2 (0%)21, SMTP pre-DATA-flush: 11 (1%)21,
SMTP DATA: 10 (1%)22, body_digest: 10 (1%)23, gen_mail_id: 4 (0%)23,
mkdir parts: 1 (0%)23, mime_decode: 136 (8%)31, get-file-type1: 73
(4%)35, decompose_part: 2 (0%)35, parts_decode: 0 (0%)35, update_cache:
110 (6%)41, decide_mail_destiny: 2 (0%)41, fwd-connect: 160 (9%)51,
fwd-mail-from: 11 (1%)51, fwd-rcpt-to: 26 (2%)53, fwd-data-cmd: 2
(0%)53, write-header: 12 (1%)54, fwd-data-contents: 0 (0%)54,
fwd-data-end: 38 (2%)56, fwd-rundown: 6 (0%)56, prepare-dsn: 734
(42%)98, main_log_entry: 15 (1%)99, update_snmp: 7 (0%)100,
unlink-1-files: 5 (0%)100, rundown: 1 (0%)100
Nov 12 12:41:32 xen05 postfix/smtp[3178]: DA9DB782D3:
to=<satimis@satimis.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.4,
delays=1.6/0.03/0.41/1.4, dsn=2.6.0, status=sent (250 2.6.0 Ok,
id=02419-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as
757D9782F6)
Nov 12 12:41:32 xen05 postfix/qmgr[2884]: DA9DB782D3: removed


# ls -al /var/spool/mail/
total 52
drwxrwsr-x  3 root    mail     4096 2008-11-12 12:55 .
drwxr-xr-x 14 root    root     4096 2008-11-07 11:31 ..
-rw-------  1 root    mail    30076 2008-11-12 06:25 root
-rw-------  1 satimis mail     6639 2008-11-12 12:55 satimis
drwxr-sr-x  2 virtual virtual  4096 2008-11-08 06:33 virtual


2)
Sent another mail on Yahoo to satimis@satimis.com


# tail /var/log/mail.log
Nov 12 12:41:32 xen05 amavis[2419]: (02419-01) TIMING [total 1736 ms] -
SMTP EHLO: 341 (20%)20, SMTP pre-MAIL: 1 (0%)20, mkdir tempdir: 15
(1%)21, create email.txt: 2 (0%)21, SMTP pre-DATA-flush: 11 (1%)21,
SMTP DATA: 10 (1%)22, body_digest: 10 (1%)23, gen_mail_id: 4 (0%)23,
mkdir parts: 1 (0%)23, mime_decode: 136 (8%)31, get-file-type1: 73
(4%)35, decompose_part: 2 (0%)35, parts_decode: 0 (0%)35, update_cache:
110 (6%)41, decide_mail_destiny: 2 (0%)41, fwd-connect: 160 (9%)51,
fwd-mail-from: 11 (1%)51, fwd-rcpt-to: 26 (2%)53, fwd-data-cmd: 2
(0%)53, write-header: 12 (1%)54, fwd-data-contents: 0 (0%)54,
fwd-data-end: 38 (2%)56, fwd-rundown: 6 (0%)56, prepare-dsn: 734
(42%)98, main_log_entry: 15 (1%)99, update_snmp: 7 (0%)100,
unlink-1-files: 5 (0%)100, rundown: 1 (0%)100
Nov 12 12:41:32 xen05 postfix/smtp[3178]: DA9DB782D3:
to=<satimis@satimis.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.4,
delays=1.6/0.03/0.41/1.4, dsn=2.6.0, status=sent (250 2.6.0 Ok,
id=02419-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as
757D9782F6)
Nov 12 12:41:32 xen05 postfix/qmgr[2884]: DA9DB782D3: removed
Nov 12 12:42:00 xen05 postfix/smtpd[3171]: disconnect from
yx-out-1718.google.com[74.125.44.152]
Nov 12 12:45:20 xen05 postfix/anvil[3172]: statistics: max connection
rate 1/60s for (smtp:74.125.44.152) at Nov 12 12:41:28
Nov 12 12:45:20 xen05 postfix/anvil[3172]: statistics: max connection
count 1 for (smtp:74.125.44.152) at Nov 12 12:41:28
Nov 12 12:45:20 xen05 postfix/anvil[3172]: statistics: max cache size 1
at Nov 12 12:41:28
Nov 12 12:48:09 xen05 postfix/smtpd[3378]: connect from
web35208.mail.mud.yahoo.com[66.163.179.87]
Nov 12 12:48:10 xen05 postfix/smtpd[3378]: NOQUEUE: reject: RCPT from
web35208.mail.mud.yahoo.com[66.163.179.87]: 450 4.7.1
<satimis@satimis.com>: Recipient address rejected: Greylisted, see
http://isg.ee.ethz.ch/tools/postgrey/help/satimis.com.html;
from=<satimis@yahoo.com> to=<satimis@satimis.com> proto=SMTP
helo=<web35208.mail.mud.yahoo.com>
Nov 12 12:48:11 xen05 postfix/smtpd[3378]: disconnect from
web35208.mail.mud.yahoo.com[66.163.179.87]


It also arrived, being added on the same file /var/spool/mail/satimis
again.


I have no idea what does it refer to on following link;

http://isg.ee.ethz.ch/tools/postgrey/help/satimis.com.html


Postgrey is running on this box.


3)
Again sent another mail on Gmail to satimis@satimis.com.  It also
arrived being added to /var/spool/mail/satimis file


Problem solved.


Others noted with thanks.


Now how can I make the 1st incoming mail creating subdirectoris /cur
/new etc automatically.  TIA


B.R.
Stephen L





> > # tail /var/log/mail.log
> > Nov 12 06:53:52 xen05 postfix/smtpd[3448]: connect from
> > web35206.mail.mud.yahoo.com[66.163.179.85]
> > Nov 12 06:53:53 xen05 postfix/smtpd[3448]: NOQUEUE: reject: RCPT
> from
> > web35206.mail.mud.yahoo.com[66.163.179.85]: 554 5.7.1
> > <postmaster@satimis.com>: Relay access denied;
> 
> That seems about right because you don't have specified that
> mail for users at satimis.com is to be delivered locally.
> 
> Note that xen05.satimis.com and satimis.com are two different domains
> (or hosts). That's why I pointed out in my other post that in terms
> of
> mail delivery, a domain is always a FQDN.
> 
> > from=<satimis@yahoo.com> to=<postmaster@satimis.com> proto=SMTP
> > helo=<web35206.mail.mud.yahoo.com>
> > Nov 12 06:53:54 xen05 postfix/smtpd[3448]: disconnect from
> > web35206.mail.mud.yahoo.com[66.163.179.85]
> > Nov 12 06:53:55 xen05 postfix/smtpd[3448]: connect from
> > web35206.mail.mud.yahoo.com[66.163.179.85]
> > Nov 12 06:53:56 xen05 postfix/smtpd[3448]: NOQUEUE: reject: RCPT
> from
> > web35206.mail.mud.yahoo.com[66.163.179.85]: 554 5.7.1
> > <satimis@satimis.com>: Relay access denied;
> from=<satimis@yahoo.com>
> > to=<satimis@satimis.com> proto=SMTP
> helo=<web35206.mail.mud.yahoo.com>
> 
> You are not delivering mail for satimis.com locally, and you don't
> relay it, either. The only choice is to reject it. Remember, in terms
> of mail delivery, a domain is always a FQDN.
> 
> > Nov 12 06:53:56 xen05 postfix/smtpd[3448]: disconnect from
> > web35206.mail.mud.yahoo.com[66.163.179.85]
> > Nov 12 06:57:16 xen05 postfix/anvil[3449]: statistics: max
> connection
> > rate 2/60s for (smtp:66.163.179.85) at Nov 12 06:53:55
> > Nov 12 06:57:16 xen05 postfix/anvil[3449]: statistics: max
> connection
> > count 1 for (smtp:66.163.179.85) at Nov 12 06:53:52
> > Nov 12 06:57:16 xen05 postfix/anvil[3449]: statistics: max cache
> size
> > 1 at Nov 12 06:53:52
> 
> These max values seem a bit odd. Only 2 connections per minute
> allowed?
> Cache size only 1 (1 of what?)?
> 
> > Could you please explain in more detail.  Where to check and how to
> > correct it.  TIA
> 
> Well, I can try, but like I said, I don't know postfix ... You need
> to
> tell us what exactly you want to do (relay mail? recieve it? send
> it? ...), what domains and hosts are involved and how mail arrives
> (static IP? fetchmail?).
> 
> The next thing is to check the stuff about virtual domains --- I'm
> guessing that you don't need any of that. See
> http://www.postfix.org/virtual.8.html:
> 
> "       virtual_mailbox_domains ($virtual_mailbox_maps)
>               Postfix is final destination for the specified list
>               of   domains;  mail  is  delivered  via  the  $vir-
>               tual_transport mail delivery transport.
> "
> 
> "       virtual_mailbox_maps (empty)
>               Optional lookup tables with all valid addresses  in
>               the domains that match $virtual_mailbox_domains.
> "
> 
> Now you specified
> 
> > 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)
> 
> ... which would indicate that you are trying to deliver mail to a
> final
> destination of localhost and satimis.com. Above description in the
> manpage leaves unclear how postfix decides for which mail the final
> destination is to be obtained from virtual_mailbox_domains.
> 
> You need to find out how that decision is made ...
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org
> 
> 


Send instant messages to your online friends http://uk.messenger.yahoo.com 


Reply to: