Difference between revisions of "Postfix Local Mail"

From ArchWiki
Jump to: navigation, search
(Step 1: /etc/postfix/main.cf)
(Page merged.)
(40 intermediate revisions by 23 users not shown)
Line 1: Line 1:
<!-- --[[User:Dlanor|dlanor]] 16:16, 23 Jul 2005 (EDT) -->
#REDIRECT [[Postfix]]
<!-- end DLANOR -->
==Postfix How To: Local-Host only mail delivery==
by CacTus
==What is postfix?==
Well, I think the postfix website gives a good enough definition for our purposes.
"Postfix attempts to be fast, easy to administer, and secure, while at the same
time being sendmail compatible enough to not upset existing users. Thus, the
outside has a sendmail-ish flavor, but the inside is completely different."
-- http://www.postfix.org/
The goal of this how to is to setup postfix for local mailbox delivery only.
===Required packages:===
==Postfix Installation==
===Step 1: Install Postfix===
[root@computer] $ pacman -Sy postfix
===Step 2: Check /etc/passwd, /etc/group===
Make sure that the following shows up in /etc/passwd
Make sure that the following shows up in /etc/group
Note: Postfix can be made to run in a chroot. This document does not currently cover this. Might be added later.
==Postfix Configuration==
===Step 1: /etc/postfix/main.cf===
The only two things you need to change are as follows. Uncomment them, and modify them to the specifics listed below. Everything else can be left as installed by pacman.
inet_interfaces = localhost
mynetworks_style = host
append_dot_mydomain = no
===Step 2: edit /etc/rc.conf===
Add postfix to the daemons list. Make sure you put it after the network has started.
===Step 3: edit /etc/postfix/aliases===
namely, put a username in for the the following, substituting the correct username you desire (actual system account required) for USER
# Person who should get root's mail. Don't receive mail as root!
root:          USER
Run the following command. This creates the map file that postfix understands.
postalias /etc/postfix/aliases
===Step 4: start the daemon===
postfix check
If postfix check returns no errors, then start the daemon.
/etc/rc.d/postfix start
Check /var/log/mail.log for any errors.
===Step 5: Test===
Try sending an email. Even from yourself to yourself should be a good test.
mail -s test user
this is a test email.
now..check you mail using whatever client you desire..
===Step 6: Test some more!===
make sure root mail forwards to the desired user...use the same test above, but substitue root for user.
==More help?==
Still not working? You might try this forum thread.

Latest revision as of 03:06, 14 November 2012

Redirect to: