Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th October 2011, 09:34
daseagle daseagle is offline
Junior Member
 
Join Date: Oct 2011
Posts: 19
Thanks: 5
Thanked 0 Times in 0 Posts
Default Postfix: can send emails outside, none received

Basic situation:

Centos 5.7 installed, with ISPCONFIG3 on top.

Web services are ok, Squirrelmail logs in, sends mail.

I created via ispconfig several email addresses.

I can send mail to external accounts (yahoo, gmail, etc).

I can log in into these accounts without any problems, via webmail and pop3 or imap.

I can send email from these accounts to any external accounts, via webmail or pop3/imap.

--

Problem:

Any mail sent TO these accounts is not delivered either to the webmail interface or via download to a pop3 client. I don't get a bounce and as far as I can tell, the server accepts the mail and removes it from the queue. Then it just goes into a black hole.

Any mail sent between these accounts is also lost in the void.

I repeat, all these accounts send mail to outside world without any issues and all log in/out just fine.

---

What I have done this far is to play around with the mydestination variable, no effects ( that I can tell).

A possible source of the problem might be this warning message I get:

warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains

**example.com stands for the domain I'm using.

*** Any ideas?

**** Ispconfig might be a source of the problem ?

***** I don't think its a dns issue, since both example.com and mail.example.com point to the same ip - and I can actually see in the log that the mail does arrive.

****** Additional weirdness: seems that for any email account except the first one, I can log in, send mail, but when sending TO these, I get a bounce. So my server has the account, since it allows me to log in into webmail interface. But when receiving mail, it sais that it does not exist? At this point I'm really tempted to junk the whole mail system and move the service to my old Hmail on a win2k3 box

Last edited by daseagle; 11th October 2011 at 10:01.
Reply With Quote
Sponsored Links
  #2  
Old 11th October 2011, 09:57
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,216 Times in 4,089 Posts
Default

Quote:
warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains
Yes, thats the most likely reason for the problem. You may not use a domain as mydestination, mydomain, etc. in a postfix virtual setup that is used as virtual mail domain too. Thats why the perfect setup tutorial instructed you to use server1.example.com and not example.com as hostname for the server.

To fix that, edit /etc/postfix/main.cf and replace all occurrences of domain.tld with something like server1.domain.tld and restart postfix. Then create server1.domain.tld as dns a-record in the zone domain.tld a dnpoint it to the Ip address of your server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
daseagle (11th October 2011)
  #3  
Old 11th October 2011, 10:28
daseagle daseagle is offline
Junior Member
 
Join Date: Oct 2011
Posts: 19
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Changes in main.cf:

Edited all occurences of example.com to server1.example.com (found only one, should there be more?)

Changes in domain config:

Created an A record, from server1.example.com, pointing to my servers IP address.

Restarted postfix and named after changes.
---

Still no mail delivered to my accounts. Accounts still deliver emails to external accounts. Mail sent to my accounts still bounces back, EXCEPT for the first account (which has the same name as a real user account on the server). Excuse the total lack of knowledge, this is my very first linux server.

**Edit: mail sent TO accounts (except first account) bounces back. mail sent from these accounts still reaches yahoo, gmail without any problems.

Last edited by daseagle; 11th October 2011 at 10:39.
Reply With Quote
  #4  
Old 11th October 2011, 10:45
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,216 Times in 4,089 Posts
Default

Quote:
Edited all occurences of example.com to server1.example.com (found only one, should there be more?)
Thats ok, It can be only one.

Quote:
Still no mail delivered to my accounts. Accounts still deliver emails to external accounts. Mail sent to my accounts still bounces back, EXCEPT for the first account (which has the same name as a real user account on the server). Excuse the total lack of knowledge, this is my very first linux server.
Real users that have the same name then the part in front of the @ of virtual email addresses will catch all emails for all addresses. So you might want to rename that real user later or all email accounts for user@anydomain will go to this real user instead of the correct mailbox. But thats not the current problem and can be either fixed later of left alone if you dont need these addresses.

To the current problem: please post all error messages from the mail log file (/var/log/maillog) that gets added when a email bounces back.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 11th October 2011, 11:03
daseagle daseagle is offline
Junior Member
 
Join Date: Oct 2011
Posts: 19
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Sent a mail from a gmail account to an account on my server:

It bounced, maillog entry here:

Oct 11 15:53:38 example postfix/trivial-rewrite[3570]: warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains
Oct 11 15:53:38 example amavis[2807]: (02807-01) Passed CLEAN, [209.85.213.43] [209.85.213.43] <gmail_user@gmail.com> -> <destination_account@example.com>, Message-ID: <CA+X4hisrwWcFb8FpFDHHUy+B
Oct 11 15:53:38 example postfix/smtp[3585]: A058B6986B1: to=<destination_account@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.8, delays=2.1/0.16/0.06/1.4, dsn=2.0.0, status=sent (25
Oct 11 15:53:38 example postfix/qmgr[2732]: A058B6986B1: removed
Oct 11 15:53:39 example postfix/local[3594]: CF4096986B2: to=<destination_account@example.com>, relay=local, delay=0.17, delays=0.04/0.06/0/0.07, dsn=5.1.1, status=bounced (unknown user: "reda
Oct 11 15:53:39 example postfix/cleanup[3580]: 03BCE698789: message-id=<20111011125339.03BCE698789@server1.example.com >
Oct 11 15:53:39 example postfix/qmgr[2732]: 03BCE698789: from=<>, size=3762, nrcpt=1 (queue active)
Oct 11 15:53:39 example postfix/bounce[3595]: CF4096986B2: sender non-delivery notification: 03BCE698789
Oct 11 15:53:39 example postfix/qmgr[2732]: CF4096986B2: removed
Oct 11 15:53:39 example postfix/smtp[3596]: 03BCE698789: to=<gmail_user@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.39.26]:25, delay=0.82, delays=0.03/0.01/0.14/0.64, dsn=2.0
Oct 11 15:53:39 example postfix/qmgr[2732]: 03BCE698789: removed

---------------------

On inspection, I see that I'm still getting the error with mydestination and virtual_mailbox - I am absolutely sure I edited every example.com to server1.example.com, in main.cf!

I have a weird feeling that somehow ispconfig is to blame for all this

---
Reading through my main.cf, I found this:

#myhostname = host.domain.tld
#myhostname = virtual.domain.tld

# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
#mydomain = domain.tld

So there entries are edited out. Should they be? Or do I have to modify in som way?

Last edited by daseagle; 11th October 2011 at 11:29.
Reply With Quote
  #6  
Old 11th October 2011, 11:30
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,216 Times in 4,089 Posts
Default

Quote:
I have a weird feeling that somehow ispconfig is to blame for all this
Then your feelings are wrong The problem is only related to the initial installation of the server and not the email account configuration from ispconfig.

Please post the complete postfix main.cf file.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.

Last edited by till; 11th October 2011 at 12:03.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Catchall and Forwarding not working simmo General 6 22nd March 2014 00:54
Problems with Postfix Can send but cannot recieve emails shajazzi Server Operation 9 28th September 2011 11:03
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail-Problema jz_ HOWTO-Related Questions 9 14th September 2011 13:31
sneaking suspicion my postfix config has gone awry mjbarfoot Installation/Configuration 7 24th August 2010 12:23
CGI and FormMail Cracklefish Installation/Configuration 17 13th October 2009 13:40


All times are GMT +2. The time now is 04:48.


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