Postfix help
Hi all, been looking into mail server. I have my own domain name now.. and my box is allready webbed up and ftp able.
I now want my own mailserver, and reading through, it seems to be the best choice to go with postfix. I've read quite a lot now. But can't seem to get started.. anyone know of a good walkthrough site?? or any tips to get it running? Cheers, |
If you grab the source, you should have quite the documentation within it. Short of that, any specific questions you have, please post em up! :)
A decent walk through: http://www.postfix.org/basic.html Cool |
OK, i have postfix sorta running.
I compiled and installed , and then started up the pop daemon under /etc/inetd.conf : # Post Office Protocol version 3 (POP3) server: pop3 stream tcp nowait root /usr/sbin/tcpd /usr/sbin/popa3d I then modified the /etc/postfix/postfix.conf : (Comments dropped to save space here) queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix mail_owner = postfix myhostname = merlin #myhostname = virtual.domain.tld mydomain = lizzynnarn.com myorigin = $myhostname #myorigin = $mydomain inet_interfaces = all mydestination = merlin.lizzynnarn.com, localhost #inet_interfaces = $myhostname #inet_interfaces = $myhostname, localhost #proxy_interfaces = #proxy_interfaces = 1.2.3.4 #unknown_local_recipient_reject_code = 550 unknown_local_recipient_reject_code = 450 mynetworks = 192.168.7.1/24, 127.0.0.0/8 #mynetworks = $config_directory/mynetworks #mynetworks = hash:/etc/postfix/network_table relay_domains = $mydestination debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail newaliases_path = /usr/bin/newaliases mailq_path = /usr/bin/mailq setgid_group = postdrop manpage_directory = /usr/local/man sample_directory = /etc/postfix readme_directory = no I can now setup netscape mail as a pop , and enter my details. I can send mail to external's fine (YAY) But i cannot recieve anything both internal and external. What's going on?? DO i need to use fetchmail??? and if so why does it output : root@merlin:~# fetchmail merlin Enter password for root@merlin: IMAP connection to merlin failed: Connection refused fetchmail: Authorization failure on root@merlin.home fetchmail: Query status=3 (AUTHFAIL) root@merlin:~# ????? Any help is appreciated. I have a registered domain name (lizzynnarn.com) and i also have custom dns registered as part of www.dyndns.org services. |
Send the email to yourself so you get the reject notice and post it up, that'd be the EASIEST way for us to troubleshoot at this point. At a quick glance over, your config looks good though, nice job :)
Be sure to setup Aliases in: /etc/postfix/aliases And then afterwards run: newaliases But before either of those make sure you have something like: alias_maps = hash:/etc/postfix/aliases In the /etc/postfix/main.cf And then run: postalias /etc/postfix/aliases And finally restart Postfix: postfix reload And send a new email, post up the rejection code. HTH Cool |
Quote:
Cool |
Thanks for the input but i'm getting bogged down now,
I have the aliases file : root: ade # Basic system aliases -- these MUST be present MAILER-DAEMON: postmaster postmaster: root # General redirections for pseudo accounts bin: root daemon: root named: root nobody: root uucp: root www: root ftp-bugs: root postfix: root # Put your local aliases here. # Well-known aliases narny : ade manager: root dumper: root operator: root abuse: postmaster i have run newaliases. I then added the alias line to main.cfg I ran postalias as you said I then ran postfix reload I've mailed myself (ade) and (ade@lizzynnarn.com) I do not get anything back, neither error or success, this is what's worrying me, nothing at all. I've been reading further, do i NEED MX records set up at my dns provider (dyndns). This probably means purchasing mailhop from them. Would the fact that i mention lizzynnarn.com in the main.conf file scupper all my local mail (i'm in the home workgroup according to /etc/hosts). So confused... Thanks |
MX record, domain, and WAN IP's shouldn't have ANY bearing on sending an email locally, and more so, should return a rejection OR error message of some type if there was indeed an error. So you simply might be recieving the email ;)
In your main.cf do you see an entry: Code:
#home_mailbox = Mailbox If none are uncommented, the mail is delivered locally to: /var/spool/mail/username What I'm suggesting is that you are getting the emails, but maybe don't know where to pick em up at. No one showed you the local mailbox pickup ;) Another place to look for info is your system logger: /var/log/mail /var/log/syslog /var/log/messages Something in the area of the above mentioned files should be giving you SOMETHING. Also check: http://zoneedit.com/smtp.html To test your server, and post up the messages in the lower portion of that screen. Cool |
Well , that report says :
SMTP Connection: OK, connected to merlin.lizzynnarn.com... < 220 merlin ESMTP Postfix > HELO edit.dnsvr.com < 250 merlin > MAIL FROM:<ade_wright@btopenworld.com> < 250 Ok > RCPT TO:<ade@lizzynnarn.com> < Looks ok?? Does to me lmao *scratches head* I tried changing home_mailbox = to all three of your examples and still nothing. I looked under /var/spool/mail, and noticed a file called root. Upon opening it, it contains what looks like mail messages. How do i get my config pointed to that?? Is that indeed the right folder.. I still can't recieve any local or external mail. Sorry about bugging the hell outta ya, but i'm in over my head i reckon. And i know it's early yet, but can i cover external mail too with this (ahem) server. i've now also changed any reference in my config file to lizzynnarn.com to home. as this is my local workgroup, i figured external was a but ambitious yet :) |
Ok scratch that, i'm on a whole new level.
I've now got postfix running (sort of). I can use the linux command mailto to mail ade@merlin and oh yes, i get it. WOW!!!!!!! If using netscape mail, i send to ade@merlin it tries to send externally and fail's (still waiting for my relay to be setup from my dns provider) Can i make it send locally first?? rather than sending all over the web. output from postconf -n : root@merlin:~# postconf -n alias_maps = hash:/etc/postfix/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 default_destination_concurrency_limit = 10 default_privs = nobody inet_interfaces = all local_destination_concurrency_limit = 2 mail_owner = postfix mail_spool_directory = /var/spool/mail mailbox_command = /usr/bin/procmail -a $DOMAIN -d $LOGNAME mydestination = $myhostname localhost.$mydomain www.$mydomain mydomain = lizzynnarn.com myhostname = merlin.lizzynnarn.com myorigin = $mydomain queue_directory = /var/spool/postfix smtpd_banner = $myhostname ESMTP $mail_name |
Shouldn't be a problem, however you need a properly defined /etc/hosts to send mail locally. Setup the local IP's to resolve to the proper hostnames, for example:
192.168.1.25 merlin If Merlin's IP is indeed the above Private IP. Then, your machine should use that as it's first sorta "DNS" resolver, if it picks up "root@merlin" it should be sending mail to root at machine 192.168.1.25 You can also optionally setup and run your own real DNS server, bind, djbdns, tiny (which from my searchings appears to be the same thing as djbdns?) and probably some others. Manipulate those to resolve your IP faster than waiting for the external DNS's to get on the same page, during setting that up, you'll point your system to YOUR DNS server, and it **should** resolve, even "externally" your IP correctly. :) HTH Cool |
hey....I also am using the Custom dyndns.org for my DNS.....
in order to get your mail server to route....simply add MX record of that particulars host name....you can even wildcard it...although I don't recommend it.... [host = host.exampledomain.com] [data = exampledomain.com] however I also am experiencing the same growing pains configuring postfix....this thread has been insightful, but I continue experiencing precise the same issues... I have the ability to send mail from the root VIA mutt to my internet based email account.....but unable to send mail within the LAN locally... hopefully abit more puttering around....a mutterings to myself and I'll resolve this mess..... |
Hold on guy, there is something i would to ask to you guys,
Do you have any idea which version of the postfix that u use, coz i found it a little strange which the configuration file is postfix.conf which located in etc/postfix/ not the main.cf file ? Can you clarify it guys? |
Well it works !!!
I can both send and recieve mail using ade@lizzynnarn.com. I still have a problem when sending locally though, it goes out and then back in, (im sending to ade@merlin) rather than straight to the local mail server. I do have my /etc/hosts set up, but it's : 192.168.7.1 merlin.home merlin 192 etc etc 192 etc etc Will that make a difference that fact it's the home workgroup rather than the lizzynnarn.com domain? Other than that it's fine, out and in, really quickly. (postconf -n) : The working main.cf was : alias_maps = hash:/etc/postfix/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 default_destination_concurrency_limit = 10 default_privs = nobody inet_interfaces = all local_destination_concurrency_limit = 2 mail_owner = postfix mail_spool_directory = /var/spool/mail mailbox_command = /usr/bin/procmail -a $DOMAIN -d $LOGNAME mydestination = localhost, lizzynnarn.com mydomain = lizzynnarn.com myhostname = merlin.lizzynnarn.com mynetworks = 192.168.7.1, 192.168.7.2, 192.168.6.7.3, 193.61.122.57, 193.61.122. 51, 127.0.0.0/8 myorigin = $mydomain queue_directory = /var/spool/postfix smtpd_banner = $myhostname ESMTP $mail_name --------------------------------------------------------------------------- Its postfix version 2.0.15 for those who wish to know. Thanks for the help folks, appreciated as usual Ade |
On another note, looking at somthing masterc said
Quote:
I got that from here : http://www.linux.org/docs/ldp/howto/DNS-HOWTO-3.html Is that what you were talking about? or is there a better way (grin). Man i love my penguin !!!!! |
All times are GMT -5. The time now is 08:43 AM. |