Send-Only Server Config?
Hi All, I'm hoping for a little guidance with this. My apologies for not doing a proper search on this first, but I'm a bit pressed for time. I've been asked to build a mail server for the purpose of sending mail from various machines within a LAN to anywhere on the Net. I'm guessing that this would be considered a "relay" in a sense, since the server will not be receiving mail from the outside, but please correct me if I'm wrong. My first question is, is this a do-able solution? I've only built 1 Postfix server previously, and it took me awhile and didn't quite work as expected (due to my own lack of configuration, not with Postfix.) I'm not going to use Exim or Qmail, as I believe this setup would be very simplistic, and Postfix should be more than able to handle this, along with any potential add-ons later on (automatically archiving all outbound messages to another address, adding virus scanning, etc.) Is there any documentation available on how to get this setup? Again, my apologies for not researching this in more detail, but I need to get an answer out as soon as possible, and I figured this list would be my best bet. TIA, ~MD
Re: Send-Only Server Config?
maddae...@gmail.com wrote: Hi All, I'm hoping for a little guidance with this. My apologies for not doing a proper search on this first, but I'm a bit pressed for time. I've been asked to build a mail server for the purpose of sending mail from various machines within a LAN to anywhere on the Net. I'm guessing that this would be considered a "relay" in a sense, since the server will not be receiving mail from the outside, but please correct me if I'm wrong. My first question is, is this a do-able solution? I've only built 1 Postfix server previously, and it took me awhile and didn't quite work as expected (due to my own lack of configuration, not with Postfix.) I'm not going to use Exim or Qmail, as I believe this setup would be very simplistic, and Postfix should be more than able to handle this, along with any potential add-ons later on (automatically archiving all outbound messages to another address, adding virus scanning, etc.) Is there any documentation available on how to get this setup? Again, my apologies for not researching this in more detail, but I need to get an answer out as soon as possible, and I figured this list would be my best bet. TIA, ~MD This is very do-able, and is very nearly the default configuration. To accept mail from only your local network, use something like: # main.cf mynetworks = 127.0.0.0/8 192.168.0.0/16 smtpd_recipient_restrictions = permit_mynetworks reject with appropriate adjustments to the mynetworks setting. Or just firewall port 25 from the internet. Documentation to get you started: http://www.postfix.org/BASIC_CONFIGURATION_README.html http://www.postfix.org/STANDARD_CONFIGURATION_README.html http://www.postfix.org/documentation.html If you have more specific questions later, please see http://www.postfix.org/DEBUG_README.html#mail -- Noel Jones
Re: Send-Only Server Config?
On Thu, Jan 8, 2009 at 12:59 PM, Noel Jones wrote: > maddae...@gmail.com wrote: >> >> Hi All, >> >> I'm hoping for a little guidance with this. My apologies for not >> doing a proper search on this first, but I'm a bit pressed for time. >> >> I've been asked to build a mail server for the purpose of sending mail >> from various machines within a LAN to anywhere on the Net. I'm >> guessing that this would be considered a "relay" in a sense, since the >> server will not be receiving mail from the outside, but please correct >> me if I'm wrong. >> >> My first question is, is this a do-able solution? I've only built 1 >> Postfix server previously, and it took me awhile and didn't quite work >> as expected (due to my own lack of configuration, not with Postfix.) >> I'm not going to use Exim or Qmail, as I believe this setup would be >> very simplistic, and Postfix should be more than able to handle this, >> along with any potential add-ons later on (automatically archiving all >> outbound messages to another address, adding virus scanning, etc.) >> >> Is there any documentation available on how to get this setup? Again, >> my apologies for not researching this in more detail, but I need to >> get an answer out as soon as possible, and I figured this list would >> be my best bet. >> >> TIA, >> >> ~MD > > This is very do-able, and is very nearly the default configuration. To > accept mail from only your local network, use something like: > # main.cf > mynetworks = 127.0.0.0/8 192.168.0.0/16 > smtpd_recipient_restrictions = > permit_mynetworks > reject > > with appropriate adjustments to the mynetworks setting. > Or just firewall port 25 from the internet. > > Documentation to get you started: > http://www.postfix.org/BASIC_CONFIGURATION_README.html > http://www.postfix.org/STANDARD_CONFIGURATION_README.html > http://www.postfix.org/documentation.html > > If you have more specific questions later, please see > http://www.postfix.org/DEBUG_README.html#mail > > -- > Noel Jones > Awesome, thanks! ~MD
Re: Send-Only Server Config?
maddae...@gmail.com wrote: I've been asked to build a mail server for the purpose of sending mail from various machines within a LAN to anywhere on the Net. I'm guessing that this would be considered a "relay" in a sense, since the server will not be receiving mail from the outside, but please correct me if I'm wrong. I do something similar - having several linux servers in the internet. All of them can only send mail - to the relayhost: # varies with domain and host, of course mydomain = mynetworks = 127.0.0.0/8 myorigin = $mydomain relayhost = The relayhost receives mail from all domains and all ips/networks of those clients: # main part: mydestination = $myhostname, localhost.$mydomain, localhost, , , , , , mydomain = mynetworks = 127.0.0.0/8, , , , , myorigin = $mydomain # some additional config: append_dot_mydomain = no biff = no mailbox_size_limit = 1073741824 message_size_limit = 1024 recipient_delimiter = . relocated_maps = hash:/etc/postfix/relocated # for tests etc: #soft_bounce = no #soft_bounce = yes # security and access: strict_rfc821_envelopes = yes smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) smtpd_client_restrictions = reject_invalid_hostname smtpd_helo_required = yes smtpd_helo_restrictions = reject_invalid_hostname smtpd_recipient_restrictions = permit_mynetworks, reject_unknown_recipient_domain, permit_sasl_authenticated, reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_type = dovecot smtpd_sender_restrictions = reject_unknown_address smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache smtpd_use_tls = yes Works great :) IF you can read and send mail from any mail client - the mails do not get back to the single client servers! They stay at the relay host and can be read there via imap/pop...