Mail in wrong mailbox

Discussion in 'General' started by LinuxNoob, Sep 18, 2010.

  1. LinuxNoob

    LinuxNoob New Member

    Hi Guys,

    I followed the following guide ( http://www.howtoforge.com/perfect-server-opensuse-11.2-x86_64-ispconfig-2 ) about 9 - 10 months ago. Prior to this, I was running Mandriva - and again was via a server setup guide via HowtoForge ( good work guys )

    Current OpenSuse server has been running with no problems for the last 9 months or so - but yesterday I noticed that mail being sent to any of the 3 local domains are being delivered to just 1 catch-all account ( other domains also have catch all's and no forwards in place ) they are received in the catch-all on web1 even though the mail is addressed to domains within web2 web3 etc.

    I've searched the forums and found a lot of posts relating to the same sort of issue, and that this was being referenced to an issue in with /etc/postfix/main.cf
    referencing $mydomain

    Would someone be able to help me out with this weird issue as I cant seem to find the problem - and this server, and mail has been running fine for 9 months. I havent changed / amended anything, and cant see any recent updates from my Disto that has amended anything relating to postfix.

    Thanks

    Edit - adding main.cf - i have changed the domain to mydomain.co.uk

    Code:
    inet_protocols = all
    biff = no
    mail_spool_directory = /var/mail
    canonical_maps = hash:/etc/postfix/canonical
    virtual_alias_domains = hash:/etc/postfix/virtual
    relocated_maps = hash:/etc/postfix/relocated
    transport_maps = hash:/etc/postfix/transport
    sender_canonical_maps = hash:/etc/postfix/sender_canonical
    masquerade_exceptions = root
    masquerade_classes = envelope_sender, header_sender, header_recipient
    myhostname = fury.mydomain.co.uk
    delay_warning_time = 1h
    message_strip_characters = \0
    program_directory = /usr/lib/postfix
    inet_interfaces = all
    masquerade_domains =
    #mydestination = $myhostname, localhost.$mydomain
    defer_transports =
    mynetworks_style = subnet
    disable_dns_lookups = no
    relayhost =
    content_filter =
    mailbox_command =
    mailbox_transport =
    strict_8bitmime = no
    disable_mime_output_conversion = no
    smtpd_sender_restrictions = hash:/etc/postfix/access
    smtpd_client_restrictions =
    smtpd_helo_required = no
    smtpd_helo_restrictions =
    strict_rfc821_envelopes = no
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,check_relay_domains
    smtp_sasl_auth_enable = no
    smtpd_sasl_auth_enable = yes
    smtpd_use_tls = yes
    smtp_use_tls = yes
    alias_maps = hash:/etc/aliases
    mailbox_size_limit = 0
    message_size_limit = 0
    mydomain = mydomain.co.uk
    mynetworks = 127.0.0.0/8
    relayhost = cluster8out.eu.messagelabs.com
    smtpd_sasl_local_domain =
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_tls_auth_only = no
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    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
     
    Last edited: Sep 18, 2010
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The mydomain setting may not be identical to a email domain, so change mydomain.co.uk
    to e.g. server1.mydomain.co.uk in main.cf and restart postfix.
     
  3. LinuxNoob

    LinuxNoob New Member

    Thanks for the response Till

    Just tried that - and still get the mail being sent to the other domain(s) being delivered to the catchall on my domain.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats a clear indication that the problem is caused by a wrong hostname as I explained above. Check your setup again and change the hostname to a domain or subdomain that is not used for email.
     
  5. LinuxNoob

    LinuxNoob New Member

    There are 3 domains setup with ISPConfig.

    All 3 domains are used for mail.

    If I set the hostname to anything other than mydomain.co.uk - then no mail is received, to any of the 3 domains. If I set the hostname to literally mydomain.co.uk ( which I used, and this is not referenced anywhere on the server ) then no mail is delivered.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Change it as I told you above if you want to fix the issue! Then take a look at the mail log if you have problems with receiving the email and post the new errors that you get now.
     
  7. LinuxNoob

    LinuxNoob New Member

    If I change the mydomin - to a domain not in use at all or referenced on the server, no email is received, and nothing shows in the mail log.



    Code:
    Sep 19 18:08:23 fury postfix/smtpd[13034]: disconnect from unknown[192.168.2.41]
    Sep 19 18:08:23 fury postfix/local[13059]: CB24242E7: to=<web1_user@hostname>, orig_to=<[email protected]>, relay=local, delay=2.6, delays=0.03/0/0/2.5, dsn=2.0.0, status=sent (delivered to command: /usr/bin/proc$
    Sep 19 18:08:23 fury postfix/qmgr[13027]: CB24242E7: removed
    
    I have removed the actual domains in use above. As you can see, mail being sent to the web2 domain, is received in the web1 catch all.

    I can see what your saying Till - but any combination of the above doenst work. My main issue is - the server config hasnt been changed, and has been working fine for 8 - 9 months !
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    There must be domething in the mail log if you send a email to your server. Change the domain as I suggested above, then login to webmail with a account that is on your server and send yourself a email, then post the lines that you get in the mail log file. Do not use the catchall account for this test.
     

Share This Page