Click to See Complete Forum and Search --> : Configuring Postfix
barney.parker
05-17-2007, 07:37 AM
Hi, some of you may remember my previous thread on configuring DNS and SSH, well i'm back, and this time i want to set up Postfix!!!
Here's what i want....
I have a domain name which i currently use to forward emails to hotmail.
I would like to get postfix working so i have the ability to create whatever mailboxes i like.
I would like to ensure i am sending only from my domain, not relaying other SMTP mails...
I would like to ensure i know how to add new users mailboxes, delete mailboxes and some basic admin tasks like that!
At the moment i have postfix installed, and i can telnet to it.
Anyone know where i can find info on the above?
je_fro
05-17-2007, 11:31 AM
I used this: http://www.gentoo.org/doc/en/virt-mail-howto.xml#doc_chap2
All you really need to change is the hostname and domainname.
barney.parker
05-18-2007, 03:50 AM
Je_Fro: Thanks for the link to that doc, it's pretty good!!
I think i am still having trouble getting into the Linux frame of mind though....
Things still aren't going quite right, but i feel like i'm 90% of the way there.
Postconf -n gives me....
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = starfleet.theparkerwilmottproject.co.uk, localhost.theparkerwilmottproject.co.uk theparkerwilmottproject.co.uk
mydomain = theparkerwilmottproject.co.uk
myhostname = starfleet.theparkerwilmottproject.co.uk
mynetworks = 127.0.0.0/8
myorigin = $mydomain
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
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
When i telnet and EHLO with the domain, i get...
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 starfleet.theparkerwilmottproject.co.uk ESMTP Postfix (Ubuntu)
EHLO theparkerwilmottproject.co.uk
250-starfleet.theparkerwilmottproject.co.uk
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
but the doc says i should have a couple of lines saying
AUTH LOGIN PLAIN
AUTH=LOGIN PLAIN
so i feel happy that i have postfix installed, and nearly configured...
I have also installed courier for pop3 access, and i have two users (plus root) added to the system, for whilch i have added their aliases to /etc/courier/pop3d.cnf
soooooo....
How can i test whether a mail is..
A) being accepted via SMTP into the server
B) delivered to the users mailbox
C) can be collected via POP3
The doc keeps saying to check everything is working, but it is a bit confusing on a new system like this!!! (sadly, i'm still too dependent on GUI's....)
I would rather not redirect mail addressed to my domain until i am sure it works, as it currently gets forwarded to hotmail accounts, and that does work. If i can confirm it should work correctly first that would be great (i.e. falsely send a mail to an IP rather than a domain if you see what i mean)
Thanks for your help, i am definately starting to feel more at home with linux, but i must admit, the learning curve is steep!!!!
ric227
05-18-2007, 11:10 AM
How can i test whether a mail is..
A) being accepted via SMTP into the server
you can test via telnet (google for test smtp via telnet)
or you can configure you email client to user your postfix server for smtp and send an email.
B) delivered to the users mailbox
do you want each email to have a true linux login or do you want virtual users? howtoforge.com has some additional docs on virtual users
c) collected via POP3
postfix only handles the SMTP portion of it
you have to set up a pop3 server look at http://www.postfix.org/addon.html
for some ideas
C) can be collected via POP3
je_fro
05-18-2007, 12:23 PM
yeah, you can step through sending an email manually with telnet...that's how I'd do it...
barney.parker
05-19-2007, 11:51 AM
Je_fro: Yup, can't believe i didn;'t think of that....
OK, so i telnet from another computer to the IP of my postfix server (port 25) and get the expected 220 message.
I entered the command MAIL TO:<from address> and got a 250 2.1.0 Ok response
I enter the RCPT TO:<recipient address> using one of the aliases i added to the file /etc/postfix/aliases file, but i get
550 5.5.1 <recipient address>: Recipient Address Rejected: User unknown in locat recipient table
I checked my spelling, and no problems there, even double checked capitalisation, again, everything matched.
Nowi decided to see if the pop3 side was working, so i telnetted to the server on port 110 and got a good response.
I tried to log in using the user name and passwor di would use for this account on the server itself, but got an instant disconnection!!!
I guess i am getting this quite wrong!!!
Any ideas?
Thanks
flashingcurser
05-23-2007, 07:05 PM
If memory serves me correctly you have to hash the alias for "hash:/etc/aliases" to work correctly in postfix.
I think it is (if it isn't it's "postmap"):
postalias /etc/aliases
You can check to see if it has already been done by seeing if aliases.db in /etc/
One suggestion: as /etc/aliases may be used by other things, I would be tempted to create a new one in /etc/postfix/.
If this has been done, disregard the above.
One other thing, to get more output in your mail logs change "smtpd" to "smtpd -v" in the master.cf. It should be the first line below initial comments, it will look something like:
smtp inet n - - - - smtpd
Just change the "smtpd" part of it.
good luck
dan