Mail not being delivered properly

Discussion in 'Installation/Configuration' started by tgansert, May 31, 2006.

  1. tgansert

    tgansert New Member

    My users are reporting that they are not receiving expected emails. I have verified this, although it seems to be intermittent.

    Ok, so here are the details of one single email transaction. Something looks weird to me, but I'm not familiar enough with mail systems. Let me know what you think..

    Code:
    May 31 12:39:57 actualhost postfix/smtpd[13666]: connect from web50607.mail.yahoo.com[206.190.38.94]
    May 31 12:39:57 actualhost postfix/smtpd[13666]: 67139BB55A: client=web50607.mail.yahoo.com[206.190.38.94]
    May 31 12:39:57 actualhost postfix/cleanup[13669]: 67139BB55A: message-id=<[email protected]>
    May 31 12:39:57 actualhost postfix/qmgr[13625]: 67139BB55A: from=<[email protected]>, size=1241, nrcpt=1 (queue active)
    May 31 12:39:57 actualhost postfix/trivial-rewrite[13668]: warning: do not list domain actualhost.actualdomain.tld in BOTH mydestination and virtual_alias_domains
    May 31 12:39:57 actualhost postfix/smtpd[13666]: disconnect from web50607.mail.yahoo.com[206.190.38.94]
    May 31 12:39:59 actualhost procmail[13671]: Error while writing to "/dev/null"
    May 31 12:39:59 actualhost postfix/pickup[13624]: E2963BB68B: uid=10023 from=<user1>
    May 31 12:39:59 actualhost postfix/cleanup[13669]: E2963BB68B: message-id=<[email protected]>
    May 31 12:40:00 actualhost postfix/qmgr[13625]: E2963BB68B: from=<[email protected]>, size=387, nrcpt=1 (queue active)
    May 31 12:40:03 actualhost postfix/local[13670]: 67139BB55A: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=6, status=sent (delivered to command: /usr/bin/procmail -f-)
    May 31 12:40:03 actualhost postfix/qmgr[13625]: 67139BB55A: removed
    May 31 12:40:04 actualhost postfix/local[13699]: E2963BB68B: to=<admispconfig@localhost>, relay=local, delay=5, status=sent (delivered to command: /usr/bin/procmail -f-)
    May 31 12:40:04 actualhost postfix/qmgr[13625]: E2963BB68B: removed
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Does this email account has spam filtering with automatic spam deletion enabled?
     
  3. MateKrisz

    MateKrisz New Member

    E-mail problem

    Hi all,

    My website's users cat received e-mail 2 days ago. The auth ok, the mails not delivered they mailbox.

    What report need for you ?

    Krisz
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post an excerpt of your mail log, but to a new forum thraed and not in this thread.
     
  5. tgansert

    tgansert New Member

    From what I can tell, it is only directed to prepend the subject with ***SPAM***, but I may not have looked in the right places. Direct me where to go and I will get back to you ASAP.
     
  6. tgansert

    tgansert New Member

    Here's something interesting in /root/ispconfig/isp/conf/spamassassin.rc.master

    Code:
    # SpamAssassin sample procmailrc
    #
    # Pipe the mail through spamassassin (replace 'spamassassin' with 'spamc'
    # if you use the spamc/spamd combination)
    # The condition line ensures that only messages smaller than 250 kB
    # (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
    # isn't bigger than a few k and working with big messages can bring
    # SpamAssassin to its knees.
    :0fw
    * < 256000
    | /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin --prefs-file={PREFS_FILE}
    
    # Mails with a score of 15 or higher are almost certainly spam (with 0.05%
    # false positives according to rules/STATISTICS.txt). Let's put them in a
    # different mbox. (This one is optional.)
    #:0:
    #* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
    #/dev/null
    
    # All mail tagged as spam (eg. with a score higher than the set threshold)
    # is moved to "/dev/null".
    {SPAM_COMMENT}:0:
    {SPAM_COMMENT}* ^X-Spam-Status: Yes
    {SPAM_COMMENT}/dev/null
    
    # Work around procmail bug: any output on stderr will cause the "F" in "From"
    # to be dropped.  This will re-add it.
    :0
    * ^^rom[ ]
    {
      LOG="*** Dropped F off From_ header! Fixing up. "
    
      :0 fhw
      | sed -e '1s/^/F/'
    }
    Looks ominously like spam is sent to devnull don't pass go, dont' collect $200.

    Everything else in the world tells it to prepend as ***SPAM*** is there something in here I need to change to induce this behaviour?

    Keep in mind, emails that are most definitely not spam may not be getting through... This is not the ONLY problem, if it is a problem at all.. Till, I PM'ed you a literal log..
     
    Last edited: May 31, 2006
  7. falko

    falko Super Moderator ISPConfig Developer

    You can specify in ISPConfig what happens to spam. Just go to the Antivirus/antispam tab in the user settings.

    Why do you have virtual_alias_domains in /etc/postfix/main.cf? It shouldn't be there.
     
  8. tgansert

    tgansert New Member

    There is nowhere in the interface that I can find that specifies whether or not to delete spam.

    falko & till, I PM'ed you a link to my /etc/postfix directory in a .tar.gz file.

    If you have the time, I would be in your debt if you could take a look at my config and tell me where I'm going askew.

    Thank you so much for your help guys, it is sincerely appreciated.
     
    Last edited: Jun 1, 2006
  9. falko

    falko Super Moderator ISPConfig Developer

    http://www.ispconfig.org/downloads/manual_en/manual_kunde_en_src.htm#4_2_2 , chapter 2.2.5.

    First you have to mydestination lines in your main.cf. Comment out this one:

    Code:
    mydestination = cpoc.sjcourierpost.com, localhost.sjcourierpost.com, courierpostonline.com, theimpulseonline.com, , localhost
    Also comment out this line:
    Code:
    home_mailbox = mail
    Then restart Postfix.
    What's the output of
    Code:
    postconf -n | grep virtual_alias_domains
    and
    Code:
    postconf -d | grep virtual_alias_domains
    ?
     
  10. tgansert

    tgansert New Member

    Code:
    [root@cpoc /home/abuse]$ postconf -n | grep virtual_alias_domains
    
    [root@cpoc /home/abuse]$ postconf -d | grep virtual_alias_domains
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
    virtual_alias_domains = $virtual_alias_maps
    
    [root@cpoc /home/abuse]
    There was no response to postconf -n | grep virtual_alias_domains
     
  11. tgansert

    tgansert New Member

  12. tgansert

    tgansert New Member

    Still getting this error.

    Code:
    Jun  1 13:45:04 cpoc postfix/trivial-rewrite[10325]: warning: do not list domain cpoc.sjcourierpost.com in BOTH mydestination and virtual_alias_domains
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post your postfix main.cf file and the output of the command:

    ls -l /etc/postfix
     
  14. tgansert

    tgansert New Member

    Code:
    [root@cpoc ~]$ ls -l /etc/postfix
    total 104K
    -rw-r--r--  1 root root  286 Jun  1 11:54 local-host-names
    -rw-r--r--  1 root root  286 Jun  1 11:54 local-host-names~
    -rwxr-xr-x  1 root root  21K Feb 28  2005 post-install
    -rw-r--r--  1 root root  16K Feb 28  2005 postfix-files
    -rwxr-xr-x  1 root root 5.7K Feb 28  2005 postfix-script
    -rw-r--r--  1 root root    0 May 20 14:18 virtual_maps
    -rw-r--r--  1 root root 1.1K Jun  1 11:54 virtusertable
    -rw-r--r--  1 root root 1.1K Jun  1 11:54 virtusertable~
    -rw-r--r--  1 root root  318 Nov  1  2005 dynamicmaps.cf
    -rw-r--r--  1 root root 1.2K Jun  1 11:50 main.cf
    -rw-r--r--  1 root root 6.5K Nov  1  2005 master.cf
    -rw-r--r--  1 root root  12K May  4 18:50 virtual_maps.db
    -rw-r--r--  1 root root  12K Jun  1 11:54 virtusertable.db
    -rw-r--r--  1 root root  988 May 20 10:39 main.cf.orig
    [root@cpoc ~]$
    Code:
    [root@cpoc ~]$ cat /etc/postfix/main.cf
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    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
    
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = cpoc.sjcourierpost.com, localhost.sjcourierpost.com, courierpos                                                                             tonline.com, theimpulseonline.com, , localhost
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 25600000
    recipient_delimiter = +
    #home_mailbox = mail
    unknown_local_recipient_reject_code = 450
    relayhost =
    mynetworks = 127.0.0.0/8 10.1.220.0/22 208.44.78.0/24
    inet_interfaces = all
    queue_run_delay = 300s
    maximal_backoff_time = 1000s
    minimal_backoff_time = 300s
    virtual_maps = hash:/etc/postfix/#virtual_maps
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, rej                                                                             ect_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject                                                                             _unauth_destination, reject_unauth_pipelining, reject_invalid_hostname
    
    virtual_maps = hash:/etc/postfix/virtusertable
    
    mydestination = /etc/postfix/local-host-names
    [root@cpoc ~]$
     
  15. falko

    falko Super Moderator ISPConfig Developer

    Please comment out this line:
    Code:
    virtual_maps = hash:/etc/postfix/#virtual_maps
    Also, this line:
    Code:
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, rej                                                                             ect_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject                                                                             _unauth_destination, reject_unauth_pipelining, reject_invalid_hostname
    should read:

    Code:
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname
    Restart Postfix afterwards.
     
  16. tgansert

    tgansert New Member

    Commented out that line, but to no avail. I feel like

    Code:
    ###################################
    #
    # ISPConfig local-host-names Configuration File
    #         Version 1.0
    #
    ###################################
    localhost
    cpoc.sjcourierpost.com
    localhost.cpoc.sjcourierpost.com
    localhost.sjcourierpost.com
    #### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
    in local-host-names and

    Code:
    ###################################
    #
    # ISPConfig virtusertable Configuration File
    #         Version 1.0
    #
    ###################################
    webmail.theimpulseonline.com    VIRTUALDOMAIN
    [email protected]    user
    [email protected]    user
    [email protected]    user
    [email protected]    user
    [email protected]    user
    [email protected]    user
    [email protected]    user
    theimpulseonline.com    VIRTUALDOMAIN
    [email protected]    user
    [email protected]    user
    [email protected]    user
    [email protected]    user
    [email protected]    user
    [email protected]    user
    [email protected]    user
    cpoc.sjcourierpost.com    VIRTUALDOMAIN
    [email protected]    user
    sjcourierpost.com    VIRTUALDOMAIN
    [email protected]    user
    #### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
    are causing this problem.

    The actual host is also in ISPConfig so I can administer local mail users as well.

    If this is the root of the entire problem, I'm going to go in the computer room and open a vein.
     
  17. falko

    falko Super Moderator ISPConfig Developer

    What's the value of $go_info["server"]["postfix_config"] in /home/admispconfig/ispconfig/lib/config.inc.php?
     
  18. tgansert

    tgansert New Member

    Code:
    $go_info["server"]["postfix_config"] = 2; // 1 = SENDMAIL-STYLE, 2 = POSTFIX-STYLE
     
  19. falko

    falko Super Moderator ISPConfig Developer

    The problem seems to be that cpoc.sjcourierpost.com is in local-host-names and virtusertable at the same time. Is cpoc.sjcourierpost.com your server's hostname, and do you use it for a web site create with ISPConfig at the same time? You should always use a hostname that you do not use for anything else.
     
  20. tgansert

    tgansert New Member

    cpoc.sjcourierpost.com is the actualhost.actualdomain.tld.
    cpoc.sjcourierpost.com is in ISPConfig as cpoc.sjcourierpost.com.

    This was done for easier email administration. From what you're telling me, this is wrong. Please confirm this before I start deleting things.
     

Share This Page