Postfix send email from unknown domain

Discussion in 'Server Operation' started by petros, Aug 17, 2007.

  1. petros

    petros New Member

    Postfix send email from unknown domain[solve it]

    Hello to all
    This is my first post in your forums and I have to say that you people make a fantastic work, I have read many of yours tutorials – how-to now I have a small problem and need help.
    I have setup for personal use a small mail server following instructions for the perfect setup suse 10.2 all working fine put I notice that I can send mail for unknown domain
    let’s say [email protected] postfix allows to send this email.

    Any help where to look and what I must do?

    This is my main.cf
    Code:
    inet_protocols = all
    biff = no
    mail_spool_directory = /var/mail
    canonical_maps = hash:/etc/postfix/canonical
    virtual_alias_maps = hash:/etc/postfix/virtual
    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
    mydomain = mydomainname.name
    myhostname = server.mydomainname.name
    myorigin = $mydomain
    mynetworks = 127.0.0.0/8
    program_directory = /usr/lib/postfix
    inet_interfaces = all
    mydestination = $myhostname, localhost.$mydomain, $mydomain
    defer_transports = 
    mynetworks_style = subnet
    disable_dns_lookups = no
    relayhost = 
    home_mailbox = Maildir/
    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,reject_unauth_destination
    smtp_sasl_auth_enable = no
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_sasl_local_domain =
    smtpd_use_tls = yes
    smtp_use_tls = yes
    smtp_tls_auth_only = no
    smtpd_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
    stmpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    alias_maps = hash:/etc/aliases
    mailbox_size_limit = 0
    message_size_limit = 10240000
    
     
    Last edited: Aug 18, 2007
  2. petros

    petros New Member

    i add reject_unknown_sender_domain but still i can sent email from unknown domain

    Any idea???
     
  3. falko

    falko Super Moderator ISPConfig Developer

    Did you add it to the smtpd_sender_restrictions line and restart Postfix?
     
  4. petros

    petros New Member

    Yes i did stop start postfix

    this is my postconf -n after some changes
    Code:
    > postconf -n
    alias_maps = hash:/etc/aliases
    biff = no
    broken_sasl_auth_clients = yes
    canonical_maps = hash:/etc/postfix/canonical
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/lib/postfix
    debug_peer_level = 2
    defer_transports = 
    disable_dns_lookups = no
    disable_mime_output_conversion = no
    home_mailbox = Maildir/
    html_directory = /usr/share/doc/packages/postfix/html
    inet_interfaces = all
    inet_protocols = all
    mail_owner = postfix
    mail_spool_directory = /var/mail
    mailbox_command = 
    mailbox_size_limit = 0
    mailbox_transport = 
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    masquerade_classes = envelope_sender, header_sender, header_recipient
    masquerade_exceptions = root
    message_size_limit = 10240000
    mydestination = $myhostname, localhost.$mydomain, $mydomain
    mydomain = mydomainname.name
    myhostname = server.mydomainname.name
    mynetworks = 127.0.0.0/8
    mynetworks_style = subnet
    myorigin = $mydomain
    newaliases_path = /usr/bin/newaliases
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/packages/postfix/README_FILES
    relayhost = 
    relocated_maps = hash:/etc/postfix/relocated
    sample_directory = /usr/share/doc/packages/postfix/samples
    sender_canonical_maps = hash:/etc/postfix/sender_canonical
    sendmail_path = /usr/sbin/sendmail
    setgid_group = maildrop
    smtp_sasl_auth_enable = no
    smtp_use_tls = yes
    smtpd_client_restrictions = 
    smtpd_helo_required = no
    smtpd_helo_restrictions = 
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination, reject_unknown_sender_domain
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain = 
    smtpd_sasl_security_options = noanonymous
    smtpd_sender_restrictions = hash:/etc/postfix/access
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_use_tls = yes
    strict_8bitmime = no
    strict_rfc821_envelopes = no
    tls_random_source = dev:/dev/urandom
    transport_maps = hash:/etc/postfix/transport
    unknown_local_recipient_reject_code = 550
    virtual_alias_domains = hash:/etc/postfix/virtual
    virtual_alias_maps = hash:/etc/postfix/virtual
    
     
  5. petros

    petros New Member

    i notice in mail.err those errors

    Code:
    Aug 18 12:39:09 server.mydomainname.name imapd: authentication error: Input/output error
    Aug 18 12:39:34 server.mydomainname.name imapd: authentication error: Input/output error
    Aug 18 12:39:35 server.mydomainname.name authdaemond: Connection to server 'pgsql.example.com' userid 'admin' database 'template1' failed.
    Aug 18 12:39:35 server.mydomainname.name authdaemond: could not translate host name "pgsql.example.com" to address: Name or service not known

    I edited authdaemonrc like this
    #authmodulelist="authuserdb authpam authpgsql authldap authmysql authcustom authpipe"
    authmodulelist="authuserdb authpam authcustom authpipe"

    seems like don't have errors now, but i cant find why i sent mail from different
    domains
     
    Last edited: Aug 18, 2007
  6. petros

    petros New Member

Share This Page