LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-14-2003, 03:57 AM   #1
Evilone
Member
 
Registered: Oct 2002
Location: UK
Distribution: Slack 9.1 (2.6.5)
Posts: 307

Rep: Reputation: 30
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,
 
Old 09-14-2003, 06:57 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
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
 
Old 09-14-2003, 07:09 AM   #3
Evilone
Member
 
Registered: Oct 2002
Location: UK
Distribution: Slack 9.1 (2.6.5)
Posts: 307

Original Poster
Rep: Reputation: 30
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.
 
Old 09-14-2003, 07:18 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
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

Last edited by MasterC; 09-14-2003 at 07:21 AM.
 
Old 09-14-2003, 07:21 AM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Quote:
Originally posted by Evilone
DO i need to use fetchmail???
Not to send/recieve email from your OWN domain(s). Unless you are otherwise fubar'd (such as maybe your ISP blocks port 25, but we **should** still be able to recieve/send INSIDE the firewall if that is the case).

Cool
 
Old 09-14-2003, 07:45 AM   #6
Evilone
Member
 
Registered: Oct 2002
Location: UK
Distribution: Slack 9.1 (2.6.5)
Posts: 307

Original Poster
Rep: Reputation: 30
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
 
Old 09-14-2003, 08:02 AM   #7
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
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
home_mailbox = Maildir/
#home_mailbox = .maildir/
?

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
 
Old 09-14-2003, 08:47 AM   #8
Evilone
Member
 
Registered: Oct 2002
Location: UK
Distribution: Slack 9.1 (2.6.5)
Posts: 307

Original Poster
Rep: Reputation: 30
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

Last edited by Evilone; 09-14-2003 at 08:49 AM.
 
Old 09-14-2003, 12:36 PM   #9
Evilone
Member
 
Registered: Oct 2002
Location: UK
Distribution: Slack 9.1 (2.6.5)
Posts: 307

Original Poster
Rep: Reputation: 30
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
 
Old 09-14-2003, 04:18 PM   #10
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
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
 
Old 09-15-2003, 01:29 AM   #11
macdafoe
LQ Newbie
 
Registered: Sep 2003
Location: Fort Lauderdale
Distribution: RH 8.0
Posts: 23

Rep: Reputation: 15
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.....
 
Old 09-15-2003, 03:18 AM   #12
joseph
Member
 
Registered: Jul 2003
Location: Batam
Distribution: Ubuntu 10 And Linux Mint
Posts: 414

Rep: Reputation: 30
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?
 
Old 09-15-2003, 04:15 AM   #13
Evilone
Member
 
Registered: Oct 2002
Location: UK
Distribution: Slack 9.1 (2.6.5)
Posts: 307

Original Poster
Rep: Reputation: 30
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
 
Old 09-15-2003, 04:21 AM   #14
Evilone
Member
 
Registered: Oct 2002
Location: UK
Distribution: Slack 9.1 (2.6.5)
Posts: 307

Original Poster
Rep: Reputation: 30
On another note, looking at somthing masterc said

Quote:
You can also optionally setup and run your own real DNS server
I do run the named daemon to do my dns resolving, it's setup to be a resolving nameserver, ie, it nslookup's first before logging the result for a faster cache (at least i believe that's the way it works lol).

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 !!!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix send mail problem(In RH9, kernal 2.4.20, postfix 2.1.5) minor Linux - General 4 07-11-2005 10:12 PM
can't start postfix ./postfix status error jules_fraser Linux - Software 3 12-06-2003 07:33 PM
Postfix Help jglazner Linux - Software 0 10-16-2003 04:58 PM
POSTFIX Help Micro Linux - Software 2 05-06-2003 11:29 AM
move postfix mails from server to another postfix server onetwo Linux - Software 2 03-18-2003 03:22 PM


All times are GMT -5. The time now is 09:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration