mail forward problems

Discussion in 'Server Operation' started by cruz, Sep 2, 2007.

  1. cruz

    cruz New Member

    I set up the debian perfect server. I configured the forward mail
    HTML:
    Set Up Postfix For Relaying Emails Through Another Mailserver
    then I sent a email out of the mail I setup in the website I configured in ispconfig. I got this error in the log file.
    HTML:
    Sep  1 19:52:59 server1 imapd: LOGIN, user=web1_u1, ip=[::ffff:127.0.0.1], protocol=IMAP
    Sep  1 19:52:59 server1 imapd: LOGOUT, user=web1_u1, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=77, sent=418, time=0
    Sep  1 19:52:59 server1 postfix/smtp[22367]: 0B6F03DA45A: to=<[email protected]>, relay=smtp.sbcglobal.yahoo.com[69.147.64.31]:25, delay=0.72, delays=0.05/0.03/0.64/0, dsn=5.0.0, status=bounced (SASL authentication failed; server smtp.sbcglobal.yahoo.com[69.147.64.31] said: 535 authorization failed (#5.7.0))
    Sep  1 19:52:59 server1 postfix/cleanup[22364]: BDDBB3DA45E: message-id=<[email protected]>
    Sep  1 19:52:59 server1 postfix/bounce[22372]: 0B6F03DA45A: sender non-delivery notification: BDDBB3DA45E
    Sep  1 19:52:59 server1 postfix/qmgr[22081]: BDDBB3DA45E: from=<>, size=2868, nrcpt=1 (queue active)
    Sep  1 19:52:59 server1 postfix/qmgr[22081]: 0B6F03DA45A: removed
    Sep  1 19:53:00 server1 postfix/smtp[22367]: BDDBB3DA45E: to=<[email protected]>, relay=smtp.sbcglobal.yahoo.com[69.147.64.31]:25, delay=0.62, delays=0.01/0/0.61/0, dsn=5.0.0, status=bounced (SASL authentication failed; server smtp.sbcglobal.yahoo.com[69.147.64.31] said: 535 authorization failed (#5.7.0))
    Sep  1 19:53:00 server1 postfix/qmgr[22081]: BDDBB3DA45E: removed
    Sep  1 20:02:41 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Sep  1 20:02:41 server1 imapd: LOGIN, user=web1_u1, ip=[::ffff:127.0.0.1], protocol=IMAP
    Sep  1 20:02:42 server1 imapd: LOGOUT, user=web1_u1, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=61, sent=166, time=1
    Sep  1 20:05:16 server1 authdaemond: stopping authdaemond children
    Sep  1 20:05:16 server1 postfix/master[22073]: terminating on signal 15
    Sep  1 20:06:43 server1 authdaemond: modules="authpam", daemons=5
    Sep  1 20:06:43 server1 authdaemond: Installing libauthpam
    Sep  1 20:06:43 server1 authdaemond: Installation complete: authpam
    Sep  1 20:06:45 server1 postfix/master[2616]: daemon started -- version 2.3.8, configuration /etc/postfix
    Sep  1 20:06:58 server1 postfix/master[2616]: terminating on signal 15
    Sep  1 20:06:58 server1 postfix/master[3092]: daemon started -- version 2.3.8, configuration /etc/postfix
    Sep  1 20:07:03 server1 freshclam[3157]: freshclam daemon 0.91.2 (OS: linux-gnu, ARCH: i386, CPU: i686) 
    Sep  1 20:07:03 server1 freshclam[3157]: ClamAV update process started at Sat Sep  1 20:07:03 2007 
    Sep  1 20:07:03 server1 freshclam[3157]: SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES 
    Sep  1 20:07:03 server1 freshclam[3157]: See the FAQ at http://www.clamav.net/support/faq for an explanation. 
    Sep  1 20:07:03 server1 freshclam[3157]: main.cvd is up to date (version: 44, sigs: 133163, f-level: 20, builder: sven) 
    Sep  1 20:07:03 server1 freshclam[3157]: Downloading daily-4121.cdiff [100%] 
    Sep  1 20:07:03 server1 freshclam[3157]: Downloading daily-4122.cdiff [100%] 
    Sep  1 20:07:03 server1 freshclam[3157]: Downloading daily-4123.cdiff [100%] 
    Sep  1 20:07:03 server1 freshclam[3157]: Downloading daily-4124.cdiff [100%] 
    Sep  1 20:07:03 server1 freshclam[3157]: daily.cvd updated (version: 4124, sigs: 16517, f-level: 21, builder: acab) 
    Sep  1 20:07:03 server1 freshclam[3157]: Database updated (149680 signatures) from database.clamav.net (IP: 205.139.192.213) 
    Sep  1 20:07:03 server1 freshclam[3157]: -------------------------------------- 
    Why am I getting this in the message log?
    HTML:
    Sep  1 19:53:00 server1 postfix/smtp[22367]: BDDBB3DA45E: to=<[email protected]>, relay=smtp.sbcglobal.yahoo.com[69.147.64.31]:25, 
    the example.com is what I don't understand. I know ther is a string when setting up the mail in debian that sais example.com, but when I came to that I changed it to my domain before running the commands. Help
     
  2. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/postfix/main.cf, /etc/hostname, and /etc/hosts?
     
  3. cruz

    cruz New Member

    main cf

    HTML:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    
    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
    
    # 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 = server1.mysite4webhosting.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = server1.mysite4webhosting.com, localhost.mysite4webhosting.com, , localhost
    relayhost = smtp.sbcglobal.yahoo.com
    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
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options = 
    
    Hostname
    HTML:
    server1.mysite4webhosting.com
    
    hosts
    HTML:
    127.0.0.1	localhost.localdomain   localhost
    192.168.1.155	server1.mysite4webhosting.com	server1
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    
     
  4. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/mailname?
     
  5. cruz

    cruz New Member

    mailname postong

    mailname
    HTML:
    server1.mysite4webhosting.com
    
    I reinstalled the server and reinstalled the php script using the two working emails I created. I made sure they worked. but when I tryed to send mail, I do not receive them. I can not get this mail working with forwarding or configuring it throught the php script. Are you for hire? I have the site all modified and ready to go online except the mail and finishing the paypal. But the mail is the most important. When I install the script and place the two email addresses it is asking for, it bypasses the postfix mail? I figure it uses the php mail setup. There also is a error message under the admin pannale of the site.You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'connection,count(*) FROM user_details GROUP BY connection' at line 1. I do not know if this has anything to do with mail or not.
     
    Last edited: Sep 4, 2007
  6. cruz

    cruz New Member

    mail log

    I don't know if I need to start a new post or post this here. As I stated above. I reloaded and installed php script. I see in the mail log file, it looks like it is trying to send it out. I have port 25 and 110 open to the ip of the server in the router.
    HTML:
    Sep  4 11:51:21 server1 postfix/master[4047]: daemon started -- version 2.3.8, configuration /etc/postfix
    Sep  4 11:51:26 server1 postfix/master[4047]: terminating on signal 15
    Sep  4 11:51:42 server1 postfix/master[4289]: daemon started -- version 2.3.8, configuration /etc/postfix
    Sep  4 11:57:55 server1 postfix/master[4289]: terminating on signal 15
    Sep  4 11:57:55 server1 postfix/master[4399]: daemon started -- version 2.3.8, configuration /etc/postfix
    Sep  4 12:00:38 server1 postfix/smtpd[4427]: connect from localhost.localdomain[127.0.0.1]
    Sep  4 12:00:57 server1 postfix/smtpd[4427]: disconnect from localhost.localdomain[127.0.0.1]
    Sep  4 12:01:23 server1 authdaemond: modules="authpam", daemons=5
    Sep  4 12:01:23 server1 authdaemond: Installing libauthpam
    Sep  4 12:01:23 server1 authdaemond: Installation complete: authpam
    Sep  4 12:28:00 server1 postfix/master[4399]: terminating on signal 15
    Sep  4 12:28:00 server1 postfix/master[19876]: daemon started -- version 2.3.8, configuration /etc/postfix
    Sep  4 12:28:08 server1 postfix/master[19876]: terminating on signal 15
    Sep  4 12:28:09 server1 postfix/master[20063]: daemon started -- version 2.3.8, configuration /etc/postfix
    Sep  4 12:28:13 server1 freshclam[20123]: freshclam daemon 0.91.2 (OS: linux-gnu, ARCH: i386, CPU: i686) 
    Sep  4 12:28:13 server1 freshclam[20123]: ClamAV update process started at Tue Sep  4 12:28:13 2007 
    Sep  4 12:28:13 server1 freshclam[20123]: SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES 
    Sep  4 12:28:13 server1 freshclam[20123]: See the FAQ at http://www.clamav.net/support/faq for an explanation. 
    Sep  4 12:28:13 server1 freshclam[20123]: main.cvd is up to date (version: 44, sigs: 133163, f-level: 20, builder: sven) 
    Sep  4 12:28:13 server1 freshclam[20123]: getfile: daily-4016.cdiff not found on remote server (IP: 194.47.250.218) 
    Sep  4 12:28:14 server1 freshclam[20123]: getpatch: Can't download daily-4016.cdiff from database.clamav.net 
    Sep  4 12:28:14 server1 freshclam[20123]: getfile: daily-4016.cdiff not found on remote server (IP: 65.120.238.2) 
    Sep  4 12:28:14 server1 freshclam[20123]: getpatch: Can't download daily-4016.cdiff from database.clamav.net 
    Sep  4 12:28:14 server1 freshclam[20123]: getfile: daily-4016.cdiff not found on remote server (IP: 128.121.60.235) 
    Sep  4 12:28:14 server1 freshclam[20123]: getpatch: Can't download daily-4016.cdiff from database.clamav.net 
    Sep  4 12:28:14 server1 freshclam[20123]: Incremental update failed, trying to download daily.cvd 
    Sep  4 12:28:15 server1 freshclam[20123]: Downloading daily.cvd [100%] 
    Sep  4 12:28:15 server1 freshclam[20123]: daily.cvd updated (version: 4154, sigs: 17364, f-level: 21, builder: ccordes) 
    Sep  4 12:28:15 server1 freshclam[20123]: Database updated (150527 signatures) from database.clamav.net (IP: 64.246.134.133) 
    Sep  4 12:28:15 server1 freshclam[20123]: -------------------------------------- 
    Sep  4 12:28:46 server1 postfix/master[20063]: terminating on signal 15
    Sep  4 12:28:46 server1 postfix/master[20331]: daemon started -- version 2.3.8, configuration /etc/postfix
    Sep  4 12:30:40 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Sep  4 12:30:40 server1 imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=30, sent=452
    Sep  4 12:34:29 server1 postfix/master[20331]: terminating on signal 15
    Sep  4 12:34:30 server1 postfix/master[20801]: daemon started -- version 2.3.8, configuration /etc/postfix
    Sep  4 13:13:38 server1 postfix/pickup[20806]: E37792E2D53: uid=33 from=<www-data>
    Sep  4 13:13:38 server1 postfix/cleanup[21574]: E37792E2D53: message-id=<[email protected]>
    Sep  4 13:13:38 server1 postfix/qmgr[20807]: E37792E2D53: from=<[email protected]>, size=351, nrcpt=1 (queue active)
    Sep  4 13:14:09 server1 postfix/smtp[21576]: connect to mx4.hotmail.com[65.54.244.232]: Connection timed out (port 25)
    Sep  4 13:14:39 server1 postfix/smtp[21576]: connect to mx1.hotmail.com[65.54.245.8]: Connection timed out (port 25)
    Sep  4 13:15:09 server1 postfix/smtp[21576]: connect to mx3.hotmail.com[65.54.244.72]: Connection timed out (port 25)
    Sep  4 13:15:39 server1 postfix/smtp[21576]: connect to mx3.hotmail.com[65.54.244.200]: Connection timed out (port 25)
    Sep  4 13:16:09 server1 postfix/smtp[21576]: connect to mx1.hotmail.com[65.54.244.136]: Connection timed out (port 25)
    Sep  4 13:16:09 server1 postfix/smtp[21576]: E37792E2D53: to=<[email protected]>, relay=none, delay=150, delays=0.02/0.02/150/0, dsn=4.4.1, status=deferred (connect to mx1.hotmail.com[65.54.244.136]: Connection timed out)
    Sep  4 13:41:10 server1 postfix/qmgr[20807]: E37792E2D53: from=<[email protected]>, size=351, nrcpt=1 (queue active)
    Sep  4 13:41:40 server1 postfix/smtp[21928]: connect to mx4.hotmail.com[65.54.244.104]: Connection timed out (port 25)
    Sep  4 13:42:10 server1 postfix/smtp[21928]: connect to mx3.hotmail.com[65.54.244.72]: Connection timed out (port 25)
    Sep  4 13:42:40 server1 postfix/smtp[21928]: connect to mx2.hotmail.com[65.54.244.168]: Connection timed out (port 25)
    Sep  4 13:43:10 server1 postfix/smtp[21928]: connect to mx4.hotmail.com[65.54.245.104]: Connection timed out (port 25)
    Sep  4 13:43:40 server1 postfix/smtp[21928]: connect to mx3.hotmail.com[65.54.244.200]: Connection timed out (port 25)
    Sep  4 13:43:40 server1 postfix/smtp[21928]: E37792E2D53: to=<[email protected]>, relay=none, delay=1801, delays=1651/0.01/150/0, dsn=4.4.1, status=deferred (connect to mx3.hotmail.com[65.54.244.200]: Connection timed out)
    Sep  4 14:14:30 server1 postfix/qmgr[20807]: E37792E2D53: from=<[email protected]>, size=351, nrcpt=1 (queue active)
    Sep  4 14:15:00 server1 postfix/smtp[22352]: connect to mx1.hotmail.com[65.54.245.8]: Connection timed out (port 25)
    Sep  4 14:15:30 server1 postfix/smtp[22352]: connect to mx3.hotmail.com[65.54.244.72]: Connection timed out (port 25)
    Sep  4 14:16:00 server1 postfix/smtp[22352]: connect to mx4.hotmail.com[65.54.244.232]: Connection timed out (port 25)
    Sep  4 14:16:30 server1 postfix/smtp[22352]: connect to mx2.hotmail.com[65.54.244.40]: Connection timed out (port 25)
    Sep  4 14:17:00 server1 postfix/smtp[22352]: connect to mx2.hotmail.com[65.54.245.40]: Connection timed out (port 25)
    Sep  4 14:17:00 server1 postfix/smtp[22352]: E37792E2D53: to=<[email protected]>, relay=none, delay=3802, delays=3652/0.01/150/0, dsn=4.4.1, status=deferred (connect to mx2.hotmail.com[65.54.245.40]: Connection timed out)
    Sep  4 14:52:15 server1 freshclam[20123]: Received signal: wake up 
    Sep  4 14:52:15 server1 freshclam[20123]: ClamAV update process started at Tue Sep  4 14:52:15 2007 
    Sep  4 14:52:15 server1 freshclam[20123]: SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES 
    Sep  4 14:52:15 server1 freshclam[20123]: See the FAQ at http://www.clamav.net/support/faq for an explanation. 
    Sep  4 14:52:15 server1 freshclam[20123]: main.cvd is up to date (version: 44, sigs: 133163, f-level: 20, builder: sven) 
    Sep  4 14:52:16 server1 freshclam[20123]: Downloading daily-4155.cdiff [100%] 
    Sep  4 14:52:16 server1 freshclam[20123]: daily.cvd updated (version: 4155, sigs: 17406, f-level: 21, builder: arnaud) 
    Sep  4 14:52:16 server1 freshclam[20123]: Database updated (150569 signatures) from database.clamav.net (IP: 194.47.250.218) 
    Sep  4 14:52:16 server1 freshclam[20123]: -------------------------------------- 
    Sep  4 15:21:10 server1 postfix/qmgr[20807]: E37792E2D53: from=<[email protected]>, size=351, nrcpt=1 (queue active)
    Sep  4 15:21:41 server1 postfix/smtp[23199]: connect to mx4.hotmail.com[65.54.245.104]: Connection timed out (port 25)
    Sep  4 15:22:11 server1 postfix/smtp[23199]: connect to mx4.hotmail.com[65.54.244.104]: Connection timed out (port 25)
    Sep  4 15:22:41 server1 postfix/smtp[23199]: connect to mx4.hotmail.com[65.54.244.232]: Connection timed out (port 25)
    Sep  4 15:23:11 server1 postfix/smtp[23199]: connect to mx2.hotmail.com[65.54.244.40]: Connection timed out (port 25)
    Sep  4 15:23:41 server1 postfix/smtp[23199]: connect to mx3.hotmail.com[65.54.245.72]: Connection timed out (port 25)
    Sep  4 15:23:41 server1 postfix/smtp[23199]: E37792E2D53: to=<[email protected]>, relay=none, delay=7802, delays=7652/0.01/150/0, dsn=4.4.1, status=deferred (connect to mx3.hotmail.com[65.54.245.72]: Connection timed out)
    
     
  7. falko

    falko Super Moderator ISPConfig Developer

  8. chuckl

    chuckl New Member

    Cruz,

    You are sending mail from a website as the default Apache user - 'www-data'. You cannot send email to [email protected].
    That is an absolute no-no with any of the 800 kilo gorillas - Hotmail, Yahoo, Gmail etc. Some they will bounce, some they will spam bin, and some they will just delete.

    Any mail you send from a website should have from and return-path addresses defined to real email addresses from a registered domain, particularly the return path. You should also have postmaster and bounce email addresses defined and created.
    Anything that sends mail for a domain should have an MX record for that domain pointing at it, a matching Address A record for the server, as well as an SPF record. Reverse DNS should also be properly configured and working.
    The SMTP salutation from the mail server has to match as well.

    Finally, the message itself has to be well formed and standards compliant. If the headers say 7bit data and you start sending 8bit - spam bin or delete instantly.

    Rgds,
     
  9. cruz

    cruz New Member

    mail trubble

    I am just trying to set up this php dating script I bought. I setup debian perfect setup. I was told to enter two working emails when I set up the script. I did not know they need to be setup from the site I created in ispconfig. If I were to get a static address, then create two email accounts in ispconfig for the website i am trying to set up and use them when I reinstall the script will that work? I just want to make sure it is going to work before I fork out $ for a static ip. I don't understand about HOW the mail work in the php script with the server I have set up. I'm so new to this. I have learned allot just talking with all of you. Please let me know if this will work and I will do it. Thanks
     
  10. chuckl

    chuckl New Member

    Almost all dynamic IP addresses from home broadband and similar places are almost automatically blacklisted.
    Lets work through your setup - you enter two email addresses into your purchased script website configuration, one a Hotmail address, one a Yahoo address.
    The website sends out an email, by passing it to the mail server software e.g. Postfix on the machine via PHP mail, sendmail or whatever.
    This email is from a Hotmail account, but has a return path to [email protected].
    Now Postfix tries to send this to a Gmail user. Gmail sees a full mail server, not a user logging in, but a full mail server, saying it is the mail server mail.myhostingdomain.com, sending from a home DSL dynamic IP, with a return path address of 'nobody' or '[email protected]' and claiming that it is mail from a Hotmail email address???

    What would you do?

    An easier solution for you might be to use Google Apps or similar to relay mail for you, or start setting up the bits and pieces.
     
  11. cruz

    cruz New Member

    getting the mail to fly

    HTML:
    If I were to get a static address, then create two email accounts in ispconfig for the website i am trying to set up and use them when I reinstall the script will that work?
    I tried to relay the mail through sbc dsl mail
    HTML:
    Set Up Postfix For Relaying Emails Through Another Mailserver
    , but it did not authenticate correctly. Also if this dose work after I get the static ip, do I need to still check if my server is blackballed and get it off the list? This is a pain in the server. Thanks alot
     
  12. falko

    falko Super Moderator ISPConfig Developer

    You can try the same username and password in a normal email client (using the sbc mail server). Can you send emails then? If not, the username or password is wrong.

    Yes.
     
  13. cruz

    cruz New Member

    mail is working

    I reinstalled the mail forward and found I had one letter off on the mail. It is working, however I tryed to set up a user account and got an error message.
    HTML:
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'connection='1',looking_for='2',your_diz='I am looking for a friend first and for' at line 1
    I went into the sites admin pannal and clicked on site statistics and recived this
    HTML:
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'connection,count(*) FROM user_details GROUP BY connection' at line 1
    I looked for the file connection and could not find any file like that. I might have to start a new thread. Please let me know if you want me to start a new thread for this. thanks
    P.S. Do you think this might be caused by some files permissions may have changed and the files can not be written to?
     
    Last edited: Sep 7, 2007
  14. falko

    falko Super Moderator ISPConfig Developer

    Where do you get these errors? Do you use system users or virtual users for your emails?
     
  15. cruz

    cruz New Member

    mail trubble

    I got the errors in the website i installed when I was trying to create a user to test it out. I setup the mail relay you told me about using my ISP mail. Then when I set up the script I used the two mails I have setup that work (hotmail and one from sbc). Not from the mail in ispconfig. But I did setup a mail in ispconfig and it is working. Maybe I need to reset it up the site and use two mails from the ispconfig mail.
     
  16. falko

    falko Super Moderator ISPConfig Developer

    Check the SQL syntax in the scripts you use in that web site. It seems to contain errors.
     

Share This Page