HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   postfix problem (http://www.howtoforge.com/forums/showthread.php?t=51728)

jagsler 3rd March 2011 13:39

postfix problem
 
Hi!

I just followed this tutorial on how to set up postfix.

When I try to send a mail to the account mentioned in the tutorial (sales@example.com) I receive a mail in my user account (/var/spool/mail/user) with the following:

Code:

From MAILER-DAEMON  Thu Mar  3 13:35:07 2011
Return-Path: <>
X-Original-To: user@localhost.localdomain
Delivered-To: user@localhost.localdomain
Date: Thu,  3 Mar 2011 13:35:07 +0100 (CET)
From: MAILER-DAEMON@phunix02.2contact.ltd (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: user@localhost.localdomain
Auto-Submitted: auto-replied
Content-Type: multipart/report; report-type=delivery-status;
        boundary="C8AF9A2CF7.1299155707/phunix02.2contact.ltd"
Status: RO

Part 1:
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii

This is the mail system at host phunix02.2contact.ltd.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                  The mail system

<sales@example.com>: Host or domain name not found. Name service error for
    name=mail.example.com type=AAAA: Host not found

Part 2:
Content-Description: Delivery report
Content-Type: message/delivery-status


Part 3:
Content-Description: Undelivered Message
Content-Type: message/rfc822

From user@localhost.localdomain Thu Mar  3 13:35:07 2011
Return-Path: <user@localhost.localdomain>
X-Virus-Scanned: amavisd-new at localhost
From: user <user@localhost.localdomain>
Date: Thu, 03 Mar 2011 13:34:58 +0100
To: sales@example.com
Subject: JKSJHdjhsd
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=us-ascii

sdfsdfsdfjsdfhsdjfhsdfsd
fsdf
sdf

I also installed Squirrelmail, but when I try to log in with the sales@example.com account I get the following error:

Code:

ERROR:
ERROR: Connection dropped by IMAP server.

Does anyone know where I went wrong and how to make it work?
Thanks!

carlosinfl 4th March 2011 03:02

I don't get the issue you're trying to address. The message you posted looks odd. First DNS doesn't look configured properly on your server.

Then you appear to have an IMAP issue as well. Can you clarify a bit more for us?

jagsler 4th March 2011 15:39

Somewhere in the tutorial it shows how to send a mail to the sales@example.com account you've created and then at the end when you log in with the sales@example.com account in the webmail you can see the mail you send, however when I try to send this testmail it just gets returned by the MAILER-DEAMON and when I try to log on in the webmail it also shows an error.

So my issue is why doesn't the mail get delivered to the sales account like in the tutorial?

falko 4th March 2011 17:24

Any errors in your mail log?

Also, please make sure that example.com is listed in /etc/hosts.

jagsler 4th March 2011 19:22

Thanks adding the example.com to the /etc/hosts file solved the "Host not found" problem.

When I look at the maillog I can see a lot of things going wrong, but being very new to this I have no idea where to start solving them. Below is what I get when I try to send the testmail to sales@example.com

Code:

Mar  4 19:15:40 phunix02 sendmail[17991]: p24IFe57017991: from=user, size=248, class=0, nrcpts=1, msgid=<201103041815.p24IFe57017991@localhost.localdomain>, relay=root@localhost
Mar  4 19:15:40 phunix02 postfix/smtpd[17993]: connect from phunix02[127.0.0.1]
Mar  4 19:15:40 phunix02 sendmail[17991]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Mar  4 19:15:40 phunix02 postfix/trivial-rewrite[17995]: warning: do not list domain localhost.localdomain in BOTH mydestination and virtual_mailbox_domains
Mar  4 19:15:40 phunix02 postfix/trivial-rewrite[17995]: warning: do not list domain localhost.localdomain in BOTH mydestination and virtual_mailbox_domains
Mar  4 19:15:40 phunix02 postfix/smtpd[17993]: 235AAA00AA: client=phunix02[127.0.0.1], sasl_sender=user@localhost.localdomain
Mar  4 19:15:40 phunix02 postfix/cleanup[18000]: 235AAA00AA: message-id=<201103041815.p24IFe57017991@localhost.localdomain>
Mar  4 19:15:40 phunix02 postfix/qmgr[29905]: 235AAA00AA: from=<user@localhost.localdomain>, size=720, nrcpt=1 (queue active)
Mar  4 19:15:40 phunix02 sendmail[17991]: p24IFe57017991: to=sales@example.com, ctladdr=user (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30248, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 235AAA00AA)
Mar  4 19:15:40 phunix02 postfix/smtpd[17993]: disconnect from phunix02[127.0.0.1]
Mar  4 19:15:55 phunix02 dccproc[18031]: no working DCC servers dcc1.dcc-servers.net dcc2.dcc-servers.net dcc3.dcc-servers.net ... at 142.27.70.211 209.169.14.2
Mar  4 19:15:59 phunix02 postfix/smtpd[18037]: connect from unknown[127.0.0.1]
Mar  4 19:15:59 phunix02 postfix/trivial-rewrite[17995]: warning: do not list domain localhost.localdomain in BOTH mydestination and virtual_mailbox_domains
Mar  4 19:15:59 phunix02 postfix/trivial-rewrite[17995]: warning: do not list domain localhost.localdomain in BOTH mydestination and virtual_mailbox_domains
Mar  4 19:15:59 phunix02 postfix/smtpd[18037]: 85D60A2D4A: client=unknown[127.0.0.1]
Mar  4 19:15:59 phunix02 postfix/cleanup[18000]: 85D60A2D4A: message-id=<201103041815.p24IFe57017991@localhost.localdomain>
Mar  4 19:15:59 phunix02 postfix/qmgr[29905]: 85D60A2D4A: from=<user@localhost.localdomain>, size=1181, nrcpt=1 (queue active)
Mar  4 19:15:59 phunix02 postfix/trivial-rewrite[17995]: warning: do not list domain localhost.localdomain in BOTH mydestination and virtual_mailbox_domains
Mar  4 19:15:59 phunix02 postfix/smtpd[18037]: disconnect from unknown[127.0.0.1]
Mar  4 19:15:59 phunix02 amavis[15079]: (15079-02) Passed CLEAN, MYNETS LOCAL [127.0.0.1] [127.0.0.1] <user@localhost.localdomain> -> <sales@localhost.localdomain>, Message-ID: <201103041815.p24IFe57017991@localhost.localdomain>, mail_id: 40gF4NNr2o66, Hits: 0.179, size: 720, queued_as: 85D60A2D4A, 19369 ms
Mar  4 19:15:59 phunix02 postfix/smtp[18001]: 235AAA00AA: to=<sales@localhost.localdomain>, relay=127.0.0.1[127.0.0.1]:10024, delay=19, delays=0.06/0/0.01/19, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=15079-02, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 85D60A2D4A)
Mar  4 19:15:59 phunix02 postfix/qmgr[29905]: 235AAA00AA: removed
Mar  4 19:15:59 phunix02 postfix/cleanup[18000]: 8DD54A00AA: message-id=<201103041815.p24IFe57017991@localhost.localdomain>
Mar  4 19:15:59 phunix02 postfix/qmgr[29905]: 8DD54A00AA: from=<user@localhost.localdomain>, size=1325, nrcpt=1 (queue active)
Mar  4 19:15:59 phunix02 postfix/local[18039]: 85D60A2D4A: to=<sales@localhost.localdomain>, relay=local, delay=0.04, delays=0.01/0.02/0/0.01, dsn=2.0.0, status=sent (forwarded as 8DD54A00AA)
Mar  4 19:15:59 phunix02 postfix/qmgr[29905]: 85D60A2D4A: removed
Mar  4 19:15:59 phunix02 postfix/smtp[18040]: 8DD54A00AA: to=<jmul@2contact.com>, orig_to=<sales@localhost.localdomain>, relay=none, delay=0.02, delays=0.01/0.01/0/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=2contact.com type=AAAA: Host found but no data record of requested type)
Mar  4 19:15:59 phunix02 postfix/cleanup[18000]: 94A48A2D4B: message-id=<20110304181559.94A48A2D4B@phunix02.2contact.ltd>
Mar  4 19:15:59 phunix02 postfix/qmgr[29905]: 94A48A2D4B: from=<>, size=3454, nrcpt=1 (queue active)
Mar  4 19:15:59 phunix02 postfix/bounce[18041]: 8DD54A00AA: sender non-delivery notification: 94A48A2D4B
Mar  4 19:15:59 phunix02 postfix/trivial-rewrite[17995]: warning: do not list domain localhost.localdomain in BOTH mydestination and virtual_mailbox_domains
Mar  4 19:15:59 phunix02 postfix/qmgr[29905]: 8DD54A00AA: removed
Mar  4 19:15:59 phunix02 postfix/local[18039]: 94A48A2D4B: to=<user@localhost.localdomain>, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Mar  4 19:15:59 phunix02 postfix/qmgr[29905]: 94A48A2D4B: removed

The jmul@2contact.com is my mail account.

falko 5th March 2011 13:54

Quote:

Mar 4 19:15:59 phunix02 postfix/trivial-rewrite[17995]: warning: do not list domain localhost.localdomain in BOTH mydestination and virtual_mailbox_domains
Please remove localhost.localdomain from your MySQL table.

jagsler 5th March 2011 18:19

Thanks, that solved the warning. But still not there..

When I try to send the test mail to sales@example.com it still returns, but the message changed a bit. Below the new mail.

Code:

From MAILER-DAEMON  Sat Mar  5 18:02:05 2011
Return-Path: <>
X-Original-To: user@localhost.localdomain
Delivered-To: user@localhost.localdomain
Date: Sat,  5 Mar 2011 18:02:05 +0100 (CET)
From: MAILER-DAEMON@phunix02.2contact.ltd (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: user@localhost.localdomain
Auto-Submitted: auto-replied
Content-Type: multipart/report; report-type=delivery-status;
        boundary="CB91FA2CF9.1299344525/phunix02.2contact.ltd"
Status: R

Part 1:
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii

This is the mail system at host phunix02.2contact.ltd.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                  The mail system

<jmul@2contact.com> (expanded from <sales@localhost.localdomain>): Host or
    domain name not found. Name service error for name=2contact.com type=AAAA:
    Host found but no data record of requested type

Part 2:
Content-Description: Delivery report
Content-Type: message/delivery-status


Part 3:
Content-Description: Undelivered Message
Content-Type: message/rfc822

From user@localhost.localdomain Sat Mar  5 18:02:05 2011
Return-Path: <user@localhost.localdomain>
Delivered-To: sales@localhost.localdomain
X-Virus-Scanned: amavisd-new at localhost
From: user <user@localhost.localdomain>
Date: Sat, 05 Mar 2011 18:01:47 +0100
To: sales@example.com
Subject: Another testmessage
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=us-ascii

Just a test

Also there are still a few weird things in the mail log:

Code:

Mar  5 18:07:05 phunix02 postfix/smtpd[20529]: timeout after END-OF-MESSAGE from unknown[127.0.0.1]
Mar  5 18:07:05 phunix02 postfix/smtpd[20529]: disconnect from unknown[127.0.0.1]
Mar  5 18:08:33 phunix02 postfix/qmgr[29905]: 158BE81549: from=<mul.jasper@gmail.com>, size=504, nrcpt=1 (queue active)
Mar  5 18:08:34 phunix02 postfix/smtp[20635]: connect to gmail-smtp-in.l.google.com[74.125.77.27]:25: Connection refused
Mar  5 18:08:34 phunix02 postfix/smtp[20635]: connect to alt1.gmail-smtp-in.l.google.com[74.125.127.27]:25: Connection refused
Mar  5 18:08:34 phunix02 postfix/smtp[20635]: connect to alt2.gmail-smtp-in.l.google.com[74.125.95.27]:25: Connection refused
Mar  5 18:08:34 phunix02 postfix/smtp[20635]: connect to alt3.gmail-smtp-in.l.google.com[74.125.157.27]:25: Connection refused
Mar  5 18:08:34 phunix02 postfix/smtp[20635]: connect to alt4.gmail-smtp-in.l.google.com[74.125.91.27]:25: Connection refused
Mar  5 18:08:34 phunix02 postfix/smtp[20635]: 158BE81549: to=<mul.jasper@gmail.com>, relay=none, delay=336136, delays=336136/0.01/0.16/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[74.125.91.27]:25: Connection refused)
Mar  5 18:11:48 phunix02 clamd[29792]: SelfCheck: Database status OK.

And this is what happened when I tried to send the mail after I deleted the localhost.localdomain

Code:

Mar  5 18:01:47 phunix02 sendmail[20509]: p25H1ld3020509: from=user, size=234, class=0, nrcpts=1, msgid=<201103051701.p25H1ld3020509@localhost.localdomain>, relay=root@localhost
Mar  5 18:01:47 phunix02 postfix/smtpd[20510]: connect from phunix02[127.0.0.1]
Mar  5 18:01:47 phunix02 sendmail[20509]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Mar  5 18:01:47 phunix02 postfix/smtpd[20510]: D5202A2CF9: client=phunix02[127.0.0.1], sasl_sender=user@localhost.localdomain
Mar  5 18:01:47 phunix02 postfix/cleanup[20517]: D5202A2CF9: message-id=<201103051701.p25H1ld3020509@localhost.localdomain>
Mar  5 18:01:47 phunix02 postfix/qmgr[29905]: D5202A2CF9: from=<user@localhost.localdomain>, size=705, nrcpt=1 (queue active)
Mar  5 18:01:47 phunix02 sendmail[20509]: p25H1ld3020509: to=sales@example.com, ctladdr=user (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30234, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as D5202A2CF9)
Mar  5 18:01:47 phunix02 postfix/smtpd[20510]: disconnect from phunix02[127.0.0.1]
Mar  5 18:02:01 phunix02 dccproc[20525]: no working DCC servers dcc1.dcc-servers.net dcc2.dcc-servers.net dcc3.dcc-servers.net ... at 142.27.70.211 209.169.14.2
Mar  5 18:02:05 phunix02 postfix/smtpd[20529]: connect from unknown[127.0.0.1]
Mar  5 18:02:05 phunix02 postfix/smtpd[20529]: C3B96A2D50: client=unknown[127.0.0.1]
Mar  5 18:02:05 phunix02 postfix/cleanup[20517]: C3B96A2D50: message-id=<201103051701.p25H1ld3020509@localhost.localdomain>
Mar  5 18:02:05 phunix02 postfix/qmgr[29905]: C3B96A2D50: from=<user@localhost.localdomain>, size=1166, nrcpt=1 (queue active)
Mar  5 18:02:05 phunix02 amavis[19600]: (19600-01) Passed CLEAN, MYNETS LOCAL [127.0.0.1] [127.0.0.1] <user@localhost.localdomain> -> <sales@localhost.localdomain>, Message-ID: <201103051701.p25H1ld3020509@localhost.localdomain>, mail_id: 8emxqISKGWv9, Hits: 0.179, size: 705, queued_as: C3B96A2D50, 17894 ms
Mar  5 18:02:05 phunix02 postfix/smtp[20518]: D5202A2CF9: to=<sales@localhost.localdomain>, relay=127.0.0.1[127.0.0.1]:10024, delay=18, delays=0.06/0/0.01/18, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=19600-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as C3B96A2D50)
Mar  5 18:02:05 phunix02 postfix/qmgr[29905]: D5202A2CF9: removed
Mar  5 18:02:05 phunix02 postfix/cleanup[20517]: CB91FA2CF9: message-id=<201103051701.p25H1ld3020509@localhost.localdomain>
Mar  5 18:02:05 phunix02 postfix/qmgr[29905]: CB91FA2CF9: from=<user@localhost.localdomain>, size=1310, nrcpt=1 (queue active)
Mar  5 18:02:05 phunix02 postfix/local[20531]: C3B96A2D50: to=<sales@localhost.localdomain>, relay=local, delay=0.04, delays=0.01/0.02/0/0.01, dsn=2.0.0, status=sent (forwarded as CB91FA2CF9)
Mar  5 18:02:05 phunix02 postfix/qmgr[29905]: C3B96A2D50: removed
Mar  5 18:02:05 phunix02 postfix/smtp[20532]: CB91FA2CF9: to=<jmul@2contact.com>, orig_to=<sales@localhost.localdomain>, relay=none, delay=0.02, delays=0.01/0.01/0/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=2contact.com type=AAAA: Host found but no data record of requested type)
Mar  5 18:02:05 phunix02 postfix/cleanup[20517]: D2811A2D51: message-id=<20110305170205.D2811A2D51@phunix02.2contact.ltd>
Mar  5 18:02:05 phunix02 postfix/qmgr[29905]: D2811A2D51: from=<>, size=3439, nrcpt=1 (queue active)
Mar  5 18:02:05 phunix02 postfix/bounce[20533]: CB91FA2CF9: sender non-delivery notification: D2811A2D51
Mar  5 18:02:05 phunix02 postfix/qmgr[29905]: CB91FA2CF9: removed
Mar  5 18:02:05 phunix02 postfix/local[20531]: D2811A2D51: to=<user@localhost.localdomain>, relay=local, delay=0.01, delays=0/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Mar  5 18:02:05 phunix02 postfix/qmgr[29905]: D2811A2D51: removed



Thanks for the help so far!

falko 6th March 2011 21:35

Please create an A record for 2contact.com or add it to your /etc/hosts file.


Quote:

Mar 5 18:08:34 phunix02 postfix/smtp[20635]: 158BE81549: to=<mul.jasper@gmail.com>, relay=none, delay=336136, delays=336136/0.01/0.16/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[74.125.91.27]:25: Connection refused)
Please check if your server is blacklisted: http://www.mxtoolbox.com/blacklists.aspx

jagsler 7th March 2011 12:18

I've added 2contact.com to the /etc/hosts file. This is what my hosts file looks like right now:

Code:

127.0.0.1        phunix02        localhost.localdomain        localhost        localhost4        example.com        2contact.com
::1        phunix02        localhost6.localdomain6        localhost6

Also I don't think i'm blacklisted, unless the timeouts mean I'm blacklisted..

Code:

Listed 0 times with 4 timeouts.
But still nothing changed..

EDIT: there is another mailserver in the domain, could it be that's the reason why sending mail to gmail isn't working? The other mailserver has ip 10.0.0.12 and is also reachable at mail.2contact.com
This other mailserver runs microsoft exchange 2003, and when I check www.mijnip.nl it shows me this IP: 87.213.105.124 and says my host name is: mail.2contact.com ... is there any way to fix this (if this ofcource is the problem) and could this also be the problem why mailing to the sales@example.com doesn't work..?

falko 8th March 2011 17:50

What's in your mail log now when you send a mail to sales@example.com?

Is the server hosted on a dynamic IP? Most dynamic IPs are blacklisted; that would explain why GMail rejects your mails.


All times are GMT +2. The time now is 16:36.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.