Hello all.. I am at a loss here :( I am trying to set up Postfix for incoming mail, and i just cant figure out how. I have tried to read howto's from the homepages, but to no avail. I am just too stupid (or tired) I have my own domain (rikjoh.com), and i have outgoing mail taken care of thru postfix. But now i want to set it up for incoming too. The server (alpha-1.rikjoh.com) is on the inside of my firewall and has 192.168.1.11 as local IP I know i need to forward all mail requests to it thru the firewall. (next project) I want to be able to recieve all mail for *@rikjoh.com At present its only 1 user with aliases rikard.johnels@rikjoh.com -> rikard@rikjoh.com -> dustpuppy@rikjoh.com But more is to come in near future. All mail is read from either, another box in the subnet. (192.168.1.3) or pop3/webmail from the outside. (also needed to be setup in te FW..) All other mail (unlisted) shall end up in a special "folder" for reading later. And all "regular" listed mail shall be delivered to the respective user. And i do NOT want to relay ANY mail at all except listed user(s) How do i set this up? Is there a GOOD easy Howto out there? Any good doc's on the subject. I saw something about antivirus scanning too.. That would be REALLY nice to have, as the future users arent into Linux. (Yet...) Happy for any input on this. -- /Rikard --------------------------------------------------------------------------------- Rikard Johnels email : rjhn@linux.nu mob : +46 70 464 99 39 --------------------------Public PGP fingerprint------------------------------ < 15 28 DF 78 67 98 B2 16 1F D3 FD C5 59 D4 B6 78 46 1C EE 56 >
On Saturday 08 June 2002 18:03, Rikard "DustPuppy" Johnels wrote:
Hello all..
I am at a loss here :( I am trying to set up Postfix for incoming mail, and i just cant figure out how. I have tried to read howto's from the homepages, but to no avail. I am just too stupid (or tired)
I have my own domain (rikjoh.com), and i have outgoing mail taken care of thru postfix. But now i want to set it up for incoming too.
The server (alpha-1.rikjoh.com) is on the inside of my firewall and has 192.168.1.11 as local IP I know i need to forward all mail requests to it thru the firewall. (next project)
I want to be able to recieve all mail for *@rikjoh.com At present its only 1 user with aliases rikard.johnels@rikjoh.com -> rikard@rikjoh.com -> dustpuppy@rikjoh.com But more is to come in near future. All mail is read from either, another box in the subnet. (192.168.1.3) or pop3/webmail from the outside. (also needed to be setup in te FW..)
All other mail (unlisted) shall end up in a special "folder" for reading later. And all "regular" listed mail shall be delivered to the respective user.
And i do NOT want to relay ANY mail at all except listed user(s)
How do i set this up? Is there a GOOD easy Howto out there? Any good doc's on the subject.
I saw something about antivirus scanning too.. That would be REALLY nice to have, as the future users arent into Linux. (Yet...)
Happy for any input on this.
DustPuppy, For now, don't worry about virus scanning, open relays, or anything like that. If you haven't already done so, you are going to need to contact your isp, and make sure that the mail exchange records have been set up correctly. Think of this as dns for e-mail. If you haven't done this, no mta is going to be able to figure out where your e-mail should go, regardless of whether you have a registered domain or not. That should be your first step. After you have done this, try out the standard config file. For a single user, or even a number of users, this should be sufficient. Start out just by accessing your mail from a machine inside your network, and see how it goes. Leave the aliases until after your system is working. Kevin
On Sun, 09 Jun 2002, Rikard just had to get this off his chest: [..]
I want to be able to recieve all mail for *@rikjoh.com
in /etc/postfix/main.cf: myhostname = rikjoh.com mydomain = $myhostname mydestination = $myhostname Setup a lokal user with a mailbox to receive the mail. mail_spool_directory = /var/spool/mail Use 'home_mailbox = Maildir/' if you want maildir style delivery.
At present its only 1 user with aliases rikard.johnels@rikjoh.com -> rikard@rikjoh.com -> dustpuppy@rikjoh.com
If you want to restrict what comes in to only these name use the following config, otherwise it should work just like that. in the same file: smtpd_recipient_restrictions = .. /* other restrictions; see sample-smptd.cf */ permit_mynetworks, check_client_access pcre:/etc/postfix/ok-clients, reject_maps_rbl, permit In /etc/postfix/ok-clients: /rikard\.+(johnels)@rikjoh\.com/ OK
But more is to come in near future. All mail is read from either, another box in the subnet. (192.168.1.3) or pop3/webmail from the outside. (also needed to be setup in te FW..)
You'll need a seperate POP3 server or webmail server for that of course, that's not included in Postfix.
All other mail (unlisted) shall end up in a special "folder" for reading later. And all "regular" listed mail shall be delivered to the respective user.
Either setup the $luser_relay config in Postfix to redirect unknown users (else they'll bounce) or let everything in and sort things with e.g. procmail.
And i do NOT want to relay ANY mail at all except listed user(s)
By default Postfix only relays for $relay_domains, $mydestination and IP# in $mynetworks. You can use $smtp-sender-restrictions to further narrow this down.
How do i set this up?
Lots of reading. You can at least try-out your setups internally by sending mail from another box (Postfix doesn't care about 'inside' or 'outside').
Is there a GOOD easy Howto out there? Any good doc's on the subject.
The docs on http://wwww.postfix.org are pretty good, as are the docs that come with postfix. Here's my setup, which is the same as you seem to want (also behind the firewall on a private network). alias_database = hash:/etc/postfix/aliases alias_maps = hash:/etc/postfix/aliases allow_percent_hack = yes allow_untrusted_routing = no body_checks = regexp:/etc/postfix/bodychecks command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/lib/postfix debug_peer_level = 3 default_destination_concurrency_limit = 10 default_privs = nobody defer_transports = disable_dns_lookups = no disable_vrfy_command = yes header_checks = regexp:/etc/postfix/headerchecks local_destination_concurrency_limit = 2 mail_name = NO-UCE; Postfix on Linux (i586) mail_owner = postfix mail_spool_directory = /var/spool/mail mailbox_command = /usr/bin/procmail mailq_path = /usr/bin/mailq manpage_directory = /usr/local/man maps_rbl_domains = relays.ordb.org, bl.spamcop.net, relays.osirusoft.com, socks.relays.osirusoft.com, dnsbl.njabl.org mydomain = xs4all.nl myhostname = ferrets4me.xs4all.nl mynetworks = 192.168.1.0/24, 127.0.0.0/8 newaliases_path = /usr/bin/newaliases notify_classes = policy,protocol,bounce,2bounce,resource,software queue_directory = /var/spool/postfix readme_directory = no relayhost = [mail.xs4all.nl] sample_directory = /etc/postfix sendmail_path = /usr/sbin/sendmail setgid_group = postdrop smtpd_banner = $myhostname ESMTP $mail_name smtpd_client_restrictions = smtpd_helo_required = yes smtpd_recipient_restrictions = reject_invalid_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_non_fqdn_hostname, reject_unauth_pipelining, reject_unknown_hostname, reject_unknown_client, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_destination, permit_mynetworks, check_client_access hash:/etc/postfix/ok-clients, check_sender_access hash:/etc/postfix/access, reject_maps_rbl, permit smtpd_sender_restrictions = strict_rfc821_envelopes = yes Change at least myhostname. mydomain, relayhost, mynetworks for your own use. Theo -- Theo v. Werkhoven ICBM 52 8 24N , 4 32 40E. S.u.S.E 7.3 x86 Kernel 2.4.16-4GB See headers for PGP/GPG info.
participants (3)
-
Kevin L Hochhalter
-
Rikard DustPuppy Johnels
-
Theo v. Werkhoven