postfix screwup

Discussion in 'Installation/Configuration' started by motofiller, Jun 10, 2010.

  1. motofiller

    motofiller New Member

    OK complete newbie to linux.
    I have setup postfix and dovecot on centos.
    everything works... but my email addresses are username@mail.domain.com instead of username@domain.com.
    I have searched high and low for my screwup. Any ideas?

    Thanks,
    Taylor
     
  2. Mark_NL

    Mark_NL New Member

    if you really own @domain.com then you should check if you have that domain added to the mydestination config setting line in your main.cf ..

    It should look something like:
    Code:
    mydestination = domain.com, localhost.localdomain, localhost
    if you post your main.cf i can have a look at it.
     
  3. motofiller

    motofiller New Member

    more info

    OK below you will find my main.cf file. Also server is a remote running Centos 5.4 64bit. Postfix/dovecot with Roundcube for webmail. I know the main.cf is wrong, i can send a test email but when trying to reply to the test email it gets returned. Makes me wonder if it's Dovecot after typing that.

    Oh i followed The Perfect Server - CentOS 5.2 install instructions for Postfix and Dovecot.


    #soft_bounce = no
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    mail_owner = postfix
    #default_privs = nobody
    #myhostname = server.southernarmor.com
    #myhostname = virtual.domain.tld
    #mydomain = southernarmor.com
    # user@that.users.mailhost.
    #myorigin = $myhostname
    #myorigin = $mydomain
    inet_interfaces = all
    #inet_interfaces = $myhostname
    #inet_interfaces = $myhostname, localhost
    inet_interfaces = all
    #proxy_interfaces =
    #proxy_interfaces = 1.2.3.4
    mydestination = $myhostname, localhost.$mydomain, localhost
    #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
    # mail.$mydomain, www.$mydomain, ftp.$mydomain
    # TRUST AND RELAY CONTROL
    #mynetworks_style = class
    #mynetworks_style = subnet
    #mynetworks_style = host
    #mynetworks = 127.0.0.1/24
    #mynetworks = $config_directory/mynetworks
    #mynetworks = hash:/etc/postfix/network_table
    #relay_domains = $mydestination
    #relayhost = $mydomain
    #relayhost = [gateway.my.domain]
    #relayhost = [mailserver.isp.tld]
    #relayhost = uucphost
    #relayhost = [an.ip.add.ress]
    #in_flow_delay = 1s
    #alias_maps = dbm:/etc/aliases
    alias_maps = hash:/etc/aliases
    #alias_maps = hash:/etc/aliases, nis:mail.aliases
    #alias_maps = netinfo:/aliases
    #alias_database = dbm:/etc/aliases
    #alias_database = dbm:/etc/mail/aliases
    alias_database = hash:/etc/aliases
    #alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases#
    #recipient_delimiter = +
    #home_mailbox = Mailbox
    #home_mailbox = Maildir/
    #mail_spool_directory = /var/mail
    #mail_spool_directory = /var/spool/mai
    #mailbox_command = /some/where/procmail
    #mailbox_command = /some/where/procmail -a "$EXTENSION"
    #mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp


    # mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
    #mailbox_transport = cyrus
    #fallback_transport = lmtp:unix:/var/lib/imap/socket/lmtp
    #fallback_transport =
    #luser_relay = $user@other.host
    #luser_relay = $local@other.host
    #luser_relay = admin+$local
    #header_checks = regexp:/etc/postfix/header_checks
    #fast_flush_domains = $relay_domains
    #smtpd_banner = $myhostname ESMTP $mail_name
    #smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
    #local_destination_concurrency_limit = 2
    #default_destination_concurrency_limit = 20
    debug_peer_level = 2
    #debug_peer_list = 127.0.0.1
    #debug_peer_list = some.domain
    debugger_command =
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    xxgdb $daemon_directory/$process_name $process_id & sleep 5

    # debugger_command =
    # PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen
    # -dmS $process_name gdb $daemon_directory/$process_name
    # $process_id & sleep 1
    sendmail_path = /usr/sbin/sendmail.postfix
    newaliases_path = /usr/bin/newaliases.postfix
    mailq_path = /usr/bin/mailq.postfix
    setgid_group = postdrop
    html_directory = no
    manpage_directory = /usr/share/man
    sample_directory = /usr/share/doc/postfix-2.3.3/samples
    readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
    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
    smtpd_use_tls = yes
    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
    myhostname = server.southernarmor.com
    home_mailbox = Maildir/
    mailbox_command =
     
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    You must set the correct sender address in your email client.
     
  5. motofiller

    motofiller New Member

    Please explain further as it does the same thing if I use mail from the shell.
     
  6. createch

    createch ISPConfig Developer ISPConfig Developer

    If you mail from the shell and find that the email is "xxx@mail.domain.com" (instead of xxx@domain.com), then please check your server host name setting.

    If you mail from the webmail interface (e.g. webmail / roundcube) and find that the email is "xxx@mail.domain.com" (instead of xxx@domain.com), then you have not yet set up your sender email in your webmail.
     
  7. motofiller

    motofiller New Member

    thanks

    Thanks for all the help!
     

Share This Page