Email Forwarding Issue

Discussion in 'Server Operation' started by crayz1, Jan 13, 2009.

  1. crayz1

    crayz1 New Member

    I am having issues forwarding emails received to virtual user accounts. The log shows the messages are received and forwarded, but I am not receiving the forwarded emails. I have scoured the forums trying to find if there is a fix for the issue, but I haven't come up with a solution.

    I have made sure my mail server is not backlisted, which it is not. The server sends and receives email without issues. I appreciate any insight/answers.

    Here is an example of the server receiving the email to the virtual user account and forwarding it to my gmail account.
    Code:
    Jan 13 11:27:57 server1 postfix/smtpd[15204]: connect from yw-out-1718.google.com[74.125.46.153]
    Jan 13 11:27:57 server1 postfix/smtpd[15204]: 87FA0A9A381: client=yw-out-1718.google.com[74.125.46.153]
    Jan 13 11:27:57 server1 postfix/cleanup[15208]: 87FA0A9A381: message-id=<[email protected]>
    Jan 13 11:27:57 server1 postfix/qmgr[14150]: 87FA0A9A381: from=<[email protected]>, size=2010, nrcpt=1 (queue active)
    Jan 13 11:27:57 server1 postfix/pickup[14148]: A22CBA9A3AD: uid=10020 from=<domain.com_user>
    Jan 13 11:27:57 server1 postfix/cleanup[15208]: A22CBA9A3AD: message-id=<[email protected]>
    Jan 13 11:27:57 server1 postfix/local[15209]: 87FA0A9A381: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=0.15, delays=0.11/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Jan 13 11:27:57 server1 postfix/cleanup[15216]: A49F1A9A3B5: message-id=<[email protected]>
    Jan 13 11:27:57 server1 postfix/qmgr[14150]: A22CBA9A3AD: from=<[email protected]>, size=458, nrcpt=1 (queue active)
    Jan 13 11:27:57 server1 postfix/local[15209]: 87FA0A9A381: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=0.18, delays=0.11/0.01/0/0.06, dsn=2.0.0, status=sent (forwarded as A49F1A9A3B5)
    Jan 13 11:27:57 server1 postfix/qmgr[14150]: A49F1A9A3B5: from=<[email protected]>, size=2178, nrcpt=1 (queue active)
    Jan 13 11:27:57 server1 postfix/qmgr[14150]: 87FA0A9A381: removed
    Jan 13 11:27:57 server1 postfix/local[15209]: A22CBA9A3AD: to=<[email protected]>, relay=local, delay=0.07, delays=0.04/0/0/0.03, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Jan 13 11:27:57 server1 postfix/qmgr[14150]: A22CBA9A3AD: removed
    Jan 13 11:27:59 server1 postfix/smtp[15218]: A49F1A9A3B5: to=<[email protected]>, orig_to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.45.27]:25, delay=2.1, delays=0.02/0.02/0.44/1.6, dsn=2.0.0, status=sent (250 2.0.0 OK 1231864079 4si3956402yxq.36)
    Jan 13 11:27:59 server1 postfix/qmgr[14150]: A49F1A9A3B5: removed
    

    virtual users table
    Code:
    [email protected]    domain.com_user
    [email protected]    domain.com_user
    [email protected]    domain.com_user
    [email protected]    domain.com_user
    
     
  2. crayz1

    crayz1 New Member

    ok, I found something that could be related to the error.

    I sent a test email from another virtual user account which correctly forwarded through postfix and was received by 3 accounts. Each account showed the email was sent from [email protected].

    Apparently I must have missed something some where.
     
  3. falko

    falko Super Moderator Howtoforge Staff

    Are you trying to forward to external addresses, or also to addresses that are on the same server?

    What's in your main.cf? (Are you using ISPConfig?)
     
  4. crayz1

    crayz1 New Member

    Yes, I am trying to forward both internally and externally. And, yes, I am using ispconfig.

    main.cf
    Code:
    # 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 (Ubuntu)
    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
    
    readme_directory = no
    
    # 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:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_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.domain.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = server1.domain.com, localhost.domain.com, , localhost
    relayhost =
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    mailbox_command =
    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_sasl_authenticated_header = 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
    home_mailbox = Maildir/
    
    virtual_maps = hash:/etc/postfix/virtusertable
    
    mydestination = /etc/postfix/local-host-names
                                                  
    Thanks for the help.
     
  5. falko

    falko Super Moderator Howtoforge Staff

    And which ones do not arrive? The forwards to the internal or to the external addresses, or both?

    Do you have SPF records for your domains?
     

Share This Page