Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 16th February 2009, 11:48
DaFux DaFux is offline
Junior Member
 
Join Date: Dec 2008
Location: Bavaria, Germany
Posts: 21
Thanks: 6
Thanked 0 Times in 0 Posts
Default Problem: Mail is being forwarded to root

I am running ISPConfig (latest stable version) with postfix (maildir is checked). Under Admin I have created one reseller, no clients no sites.

The single reseller has 3 clients and a long list of sites.

Now, this is what happens: For most of the sites (but not all of them) their mails get auto-forwarded to site#1. The original receipient gets no mail at all.

This is how the mail headers look like:

Return-Path: <webmaster@sender.com>
X-Original-To: info@client16.com
Delivered-To: web4_admin@client1.com
Received: from SendersHost (senders.host.com [senders.ip])
by client1.com (Postfix) with ESMTP id 15CDC1EECC72
for <info@client16.com>; Mon, 16 Feb 2009 11:26:20 +0100 (CET)
From: "sender.com" <webmaster@sender.com>
To: <info@client16.com>
Subject: test
Date: Mon, 16 Feb 2009 11:26:19 +0100
Message-ID: <001101c99021$01e894f0$05b9bed0$@com>
MIME-Version: 1.0
X-Security: message sanitized on MyServer
See http://www.impsec.org/email-tools/sanitizer-intro.html
for details. $Revision: 1.151 $Date: 2006-01-20 07:29:24-08
X-Security: The postmaster has not enabled quarantine of poisoned messages.
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0012_01C99029.63ACFCF0"
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcmQIQF/7FZ1aTN7Sjm612QjJyHcqw==
X-Virus-Status: No
X-Virus-Checker-Version: clamassassin 1.2.4 with clamscan / ClamAV 0.94/8995/Mon Feb 16 04:40:05 2009

In this example, mail was sent to user@site16.tld but was actually delivered to web4_admin@site1.com. This is very weird, I cannot find any reason for this behaviour.

Btw: info@client16.com is defined in ISP User / User & Email. CatchAll-Email is checked, all the rest is default.

/var/log/mail.log contains:

Feb 16 11:26:19 MyServer postfix/smtpd[27523]: connect from senders.host.com[senders.ip]
Feb 16 11:26:20 MyServer postfix/smtpd[27523]: 15CDC1EECC72: client=senders.host.com[senders.ip], sasl_method=LOGIN, sasl_username=web5_admin
Feb 16 11:26:20 MyServer postfix/cleanup[27527]: 15CDC1EECC72: message-id=<001101c99021$01e894f0$05b9bed0$@com>
Feb 16 11:26:20 MyServer postfix/qmgr[21656]: 15CDC1EECC72: from=<webmaster@sender.com>, size=2670, nrcpt=1 (queue active)
Feb 16 11:26:20 MyServer postfix/pickup[27242]: 529101EECD0A: uid=10001 from=<web4_admin>
Feb 16 11:26:20 MyServer postfix/cleanup[27527]: 529101EECD0A: message-id=<20090216102620.529101EECD0A@client1.com>
Feb 16 11:26:20 MyServer postfix/qmgr[21656]: 529101EECD0A: from=<web4_admin@client1.com>, size=384, nrcpt=1 (queue active)
Feb 16 11:26:20 MyServer postfix/local[27545]: 529101EECD0A: to=<admispconfig@localhost.localdomain>, relay=local, delay=0.07, delays=0.03/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to command: /usr/bi
n/procmail -f-)
Feb 16 11:26:20 MyServer postfix/qmgr[21656]: 529101EECD0A: removed
Feb 16 11:26:22 MyServer postfix/smtpd[27523]: disconnect from senders.host.com[senders.ip]
Feb 16 11:26:23 MyServer postfix/local[27528]: 15CDC1EECC72: to=<web4_admin@client1.com>, orig_to=<info@client16.com>, relay=local, delay=3.1, delays=0.24/0.01/0/2.8, dsn=2.0.0, status=sent (delivered
to command: /usr/bin/procmail -f-)
Feb 16 11:26:23 MyServer postfix/qmgr[21656]: 15CDC1EECC72: removed
Feb 16 11:26:51 MyServer courierpop3login: Connection, ip=[::ffff:senders.ip]

Usually the problem sits in front of the computer - but I can't find the mistake I made. Can anybody help?

Regards
DaFux

Last edited by DaFux; 2nd March 2009 at 23:18.
Reply With Quote
Sponsored Links
  #2  
Old 16th February 2009, 11:54
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

Take a look in your aliases file, some linux distributions put there default aliases that forward emails to root. Remove the lines that you dont need and run the newaliases command.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 26th February 2009, 12:14
DaFux DaFux is offline
Junior Member
 
Join Date: Dec 2008
Location: Bavaria, Germany
Posts: 21
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Sorry for my late reply - didn't see there was a message...

I already checked that - aliases just contains the standards (and even them I removed for testing - no change).

Address reqwriting and masquerading is also off.

I have checked everything and ust can't find the problem.
Reply With Quote
  #4  
Old 27th February 2009, 12:34
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

is the domain of this site the same then the hostname of your server?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 1st March 2009, 12:51
DaFux DaFux is offline
Junior Member
 
Join Date: Dec 2008
Location: Bavaria, Germany
Posts: 21
Thanks: 6
Thanked 0 Times in 0 Posts
Default

No, domain and hostname are not the same. The hostname is a unique name which does not appear in my domain names...
Reply With Quote
  #6  
Old 2nd March 2009, 13:52
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

What's in /etc/postfix/main.cf, /etc/postfix/local-host-names, and /etc/postfix/virtusertable?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 2nd March 2009, 23:15
DaFux DaFux is offline
Junior Member
 
Join Date: Dec 2008
Location: Bavaria, Germany
Posts: 21
Thanks: 6
Thanked 0 Times in 0 Posts
Default

/etc/postfix/main.cf

#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = <domain name of site #1>
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = <domain name of site #1>, <hostname>, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

virtual_maps = hash:/etc/postfix/virtusertable

mydestination = /etc/postfix/local-host-names


/etc/postfix/local-host-names

this is a very long file, containing all domains on the server. Sorry, but can't publish here without causing problems with privacy and my customers

in general, the file looks like

localhost
<hostname>
localhost.<hostname>
localhost.localdomain
<www.site1.tld>
<www.site2.tld>
etc.

/etc/postfix/virtusertable

same problem as above - privacy, can't post that...

anyway, I have checked and rechecked this file for possible problems myself many times and could not find any. All associations are correct and exactly what they should be.

Thanks
DaFux
Reply With Quote
  #8  
Old 5th March 2009, 13:02
DaFux DaFux is offline
Junior Member
 
Join Date: Dec 2008
Location: Bavaria, Germany
Posts: 21
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Update: In my original posting I said "for most of the sites (but not all of them) their mails get auto-forwarded to site#1". I just verified that - actually all mail for all sites is forwarded to site #1.
Reply With Quote
  #9  
Old 6th March 2009, 13:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Is this maybe the problem? http://www.howtoforge.com/faq/9_33_en.html
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
DaFux (9th March 2009)
  #10  
Old 9th March 2009, 19:37
DaFux DaFux is offline
Junior Member
 
Join Date: Dec 2008
Location: Bavaria, Germany
Posts: 21
Thanks: 6
Thanked 0 Times in 0 Posts
 
Default

Unfortunately not.

Actually the variable $mydomain does not exist at all in my main.cf. Instead I have $myhostname which is indeed set to the domain name of the user who receives all mail.

BUT: If I change that to another value and reload postfix, nothing changes. Still the same problem.

The header looks like:

Code:
X-Original-To: info@<recipient.com>
Delivered-To: web4_admin@<wrong_recipient.com>
Received: from ... (... [213.xxx.xxx.xxx])
	by <value in $myhostname> (Postfix) with SMTP id 75C2A1EECCE5
I tried almost everything for $myhostname, does not make any difference. Actually $myhostname is used for the server banner only, so it should not make much difference, it just appears in the mail header.

Cheers
DaFux

Last edited by DaFux; 9th March 2009 at 19:39.
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
Postfix email server problems Access denied 554 554 5.7.1 state 14 AceRimmer Server Operation 4 19th June 2008 14:36
ISPConfig not resolving web pages TheBirdMan Installation/Configuration 15 8th May 2008 21:59
Wrong steps by upgrading ISPC Berry Installation/Configuration 14 14th November 2007 16:27
Subdomains through ISPConfig for different purposes wustl_2008 Tips/Tricks/Mods 31 25th October 2007 21:45
mysql replication tera7 Server Operation 9 3rd October 2007 15:04


All times are GMT +2. The time now is 15:43.


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