Mail to rewritten to root@

Discussion in 'General' started by duanec, Feb 29, 2008.

  1. duanec

    duanec New Member

    I have two problems I can't crack.

    1) non existant local mail accounts are being delivered to [email protected] instead of rejected.

    2) the only virtual mail domain user is also being delivered to [email protected] instead of the user's mailbox, or [email protected]

    I've searched and checked lots of config files but I've hit a dead end in figuring this out.
    I've removed and readded the virtual domain user, and added them again to no avail.

    Any ideas?
     
  2. duanec

    duanec New Member

    I just noticed that unknown users in the virtual domain (userdomain.com) ARE being rejected.
    But I'm left with the two problem above:
    Users in userdomain.com AND unknown users in maindomain.com are being delivered to root@maindomain.
     
  3. duanec

    duanec New Member

    Well, I hoped someone would know what this is. I have removed the subdomain and readded it.

    If I try to mail a non existant user, it works correctly (denies)
    if I try to email the ONE users, the to gets rewritten to [email protected] and essentially is trashing all this users mail.
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Any errors in your mail log?
     
  5. duanec

    duanec New Member

    Thanks for replying falco...
    I've got other issues it seems

    I had a postmaster user with "catch all" checked on the maindomain.com and when I removed that. Delivery started again to the userdomain.com.
    the users in userdomain.com are being rewritten as [email protected] for delivery. Is that rewrite correct?

    today the server is not doing well with lots of these errors...

    Mar 1 21:47:00 webs postfix/smtpd[21307]: too many errors after RCPT from unknown[81.213.74.175]
    Mar 1 21:49:45 webs postfix/smtpd[21322]: too many errors after DATA from 82.213.177.184.dyn.user.ono.com[82.213.177.184]

    last maillog was 48 Meg
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Is maindomain.com the domain of a web site you created with ISPconfig? Do you use maindomain.com somewhere in /etc/postfix/main.cf (e.g. mydomain, myhostname, myorigin)?
     
  7. duanec

    duanec New Member

    maildomain.com is the first website I created.
    userdomain.com is another website (another vendor) created.

    The only mention of maindomain in the main.cf is ...

    myhostname = webs.maindomain.com

    $mydomain is not defined in the main.cf
    but local-host-names has all the information.

    This server server replaced a multiclient webserver AND a DNS/mail server. Because of this, it has two ips. One ip for webs(old webserver) and a second IP for hedgehog(DNS/Mail).

    I added the second IP when the old machine died.
    Both IPs are in maindomain.com
     
  8. duanec

    duanec New Member

    Ok, to follow up... (and sum up)

    The catchall checkmark on the maindomain.com (1st created) was forwarding all other domain email to postmaster/root...
    I don't need the catchall feature, so that's no problem with it off.

    The emails are being delivered to userdomain.com now, but in the maillog, the to is being rewritten:

    Mar 3 14:11:50 webs postfix/local[16470]: 08124616C61: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=8.7, delays=0.04/0.01/0/8.6, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)

    neither of these are issues as the mail is being delivered and the header information at the mail client seems all good (no rewrites)...

    Thanks for your replies, but I think I'm OK for now.
    Unless you think there is some misconfiguration (very likely) as I was forced to use this server after experimenting with it (adding/deleting domains, changing DNS records etc)
     
  9. duanec

    duanec New Member

    This is not particularly a big issue, but I have noticed that since the @userdomain.com address is getting rewritten to @maindomain.com and delivered correctly... the stats for @userdomain.com show NO mail usage.

    Not prohibitive/show stopping in my situation, but I think that may help ID the rewrite issue.
     
  10. falko

    falko Super Moderator Howtoforge Staff

  11. duanec

    duanec New Member

    maindomain.com is the only one listed as $mydomain. Do I need to blank this entry out of /etc/postfix/main.cf
    One of my problems is I created this server with a different host and domain name. I'm still trying to sort out all the references to olddomain.com.
    (in http.../mailuser, etc.)

    Yes, user prefixes are disabled. are prefixes necessary to separate mail users?
     
  12. falko

    falko Super Moderator Howtoforge Staff

    I'd use a "technical" domain for the hostname, i.e. a domain that you don't use for email and web sites. You can then use this technical domain in the Postfix configuration.



    They are strongly recommended.
     
  13. duanec

    duanec New Member

    Thanks. That's the way I had it before. Maybe I can go back without too much service interruption.
    You think if I get the local host in a NON mail domain, then the users will be accounted for correctly under his virtual domain?
    Come to think of it, it seems before changing the hostname, I was seeing addresses rewritten as [email protected]domain.
    I thought that was a problem, but I didn't check the accounting data then.

    I didn't use the user prefixes because I was replacing an existing mail server.
    Maybe I should have used aliases for backward email address compatibility.

    I was able to copy and paste the shadow file password hashes, so most users didn't notice a change.

    Thanks for your help.
     

Share This Page