Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th August 2007, 14:22
petros petros is offline
Junior Member
 
Join Date: Aug 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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 someuser@example.com 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 by petros; 18th August 2007 at 16:50.
Reply With Quote
Sponsored Links
  #2  
Old 17th August 2007, 20:06
petros petros is offline
Junior Member
 
Join Date: Aug 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Any idea???
Reply With Quote
  #3  
Old 18th August 2007, 12:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Did you add it to the smtpd_sender_restrictions line and restart Postfix?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 18th August 2007, 12:55
petros petros is offline
Junior Member
 
Join Date: Aug 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #5  
Old 18th August 2007, 13:06
petros petros is offline
Junior Member
 
Join Date: Aug 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 by petros; 18th August 2007 at 14:00.
Reply With Quote
  #6  
Old 18th August 2007, 16:49
petros petros is offline
Junior Member
 
Join Date: Aug 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

OK i found solution in

http://www.postfix.org/uce.html#smtp...r_restrictions

smtpd_sender_restrictions solve my problem

Thank you to all
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Freebsd 6.1 support misterm Installation/Configuration 10 9th April 2009 09:29
Apache2 Freezes celtic Server Operation 31 28th May 2007 17:18
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36
configuring IPTABLES firewall adityavpratap HOWTO-Related Questions 9 27th May 2006 21:42


All times are GMT +2. The time now is 12:27.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.