Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mail server, mail forwarding
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Corona688
Veteran
Veteran


Joined: 10 Jan 2004
Posts: 1204

PostPosted: Sat Dec 10, 2005 12:00 am    Post subject: Mail server, mail forwarding Reply with quote

I want to set up a mail server that will download and serve emails from an SMTP account somewhere else. What software would be reccomended for this? Any good FAQs on this I've somehow missed?
_________________
Petition for Better 64-bit ATI Drivers - Sign Here
http://www.petitiononline.com/atipet/petition.html
Back to top
View user's profile Send private message
Ijon Tichy
Tux's lil' helper
Tux's lil' helper


Joined: 25 Feb 2004
Posts: 80
Location: Seattle, WA

PostPosted: Sat Dec 10, 2005 1:09 am    Post subject: Reply with quote

I've got a simple set up with fetchmail and postfix. Fetchmail goes out and downloads mail from a few accounts and it's all spam filtered and delivered locally.

This guy's directions are for something a bit more complex, but you can probably pick and choose the pieces you want:
http://www.jennings.homelinux.net/mailserver_config.html
_________________
Death to VideoDrome.
Long live the New Flesh.
Back to top
View user's profile Send private message
Corona688
Veteran
Veteran


Joined: 10 Jan 2004
Posts: 1204

PostPosted: Sat Dec 10, 2005 7:05 am    Post subject: Reply with quote

Auuuggh. This is why I gave up the last 5 times I tried setting up a mail daemon. I've got farther this time -- it's running -- but any mail I send to it vanishes into the ether. Not bouncing, just... gone. How can I debug this?
_________________
Petition for Better 64-bit ATI Drivers - Sign Here
http://www.petitiononline.com/atipet/petition.html
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Sat Dec 10, 2005 2:16 pm    Post subject: Reply with quote

If it's Postfix then take a look in your logs. You'll get an idea of what's happening. You can make them more verbose if you are still clueless about what's happening to the mail.
Back to top
View user's profile Send private message
Corona688
Veteran
Veteran


Joined: 10 Jan 2004
Posts: 1204

PostPosted: Sat Dec 10, 2005 4:09 pm    Post subject: Reply with quote

It's Postfix, yes. There aren't any logs, so far. It's got all the signs of life of a depleted uranium lawn gnome, except it's a depleted uranium lawn gnome that's managed to send me my cron mails. That's something, anyway. ...actually, that's VERY suprising, considering I unmerged ssmtp and never told postfix to forward them to my old email.

I finally got my messages back: "Deferred: Connection timed out with <my.host>"

And yet, checking my netstat shows an unholy mess of things connected:
Code:
...
tcp        1      0 <myhost>:smtp            mailout1.accessco:59643 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:40699 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:57499 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:44342 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            203-70-53-79.adsl.:1393 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:54958 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:37434 CLOSE_WAIT
tcp        0      0 <myhost>:smtp            mailout1.accessco:33209 ESTABLISHED
tcp        0      0 <myhost>:smtp            mailout1.accessco:59785 ESTABLISHED
tcp        0      0 <myhost>:smtp            mailout1.accessco:35337 ESTABLISHED
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:52372 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imo-m28.mx.aol.co:38835 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:56333 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:34425 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:57580 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:49765 CLOSE_WAIT
tcp        0      0 <myhost>:smtp            mailout1.accessco:56184 ESTABLISHED
tcp        1      0 <myhost>:smtp            mailout1.accessco:52463 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:56031 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:42767 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:40162 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:49759 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:37630 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:52926 CLOSE_WAIT
tcp        0      0 <myhost>:smtp            mailout1.accessco:34302 ESTABLISHED
tcp        0      0 <myhost>:smtp            mailout1.accessco:41230 ESTABLISHED
tcp        1      0 <myhost>:smtp            mailout1.accessco:47934 CLOSE_WAIT
tcp        0      0 <myhost>:smtp            mailout1.accessco:48942 ESTABLISHED
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:51091 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:57593 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:56317 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:41133 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:49325 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:53513 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:36224 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:56296 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:53496 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:56460 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:54396 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:53665 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:42300 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:42369 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:41820 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:49043 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:41107 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:43390 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:36355 CLOSE_WAIT
tcp        0      0 <myhost>:smtp            mailout1.accessco:37731 ESTABLISHED
tcp        1      0 <myhost>:smtp            mailout1.accessco:54563 CLOSE_WAIT
tcp        0      0 <myhost>:smtp            mailout1.accessco:35187 ESTABLISHED
tcp        1      0 <myhost>:smtp            mailout1.accessco:39747 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:34178 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:34194 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:59574 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:46367 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:59474 CLOSE_WAIT
tcp        0      0 <myhost>:smtp            mailout1.accessco:57458 ESTABLISHED
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:57612 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:35745 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:54981 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:43409 CLOSE_WAIT
tcp        0      0 <myhost>:smtp            mailout1.accessco:45985 ESTABLISHED
tcp        1      0 <myhost>:smtp            mailout1.accessco:34769 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:47404 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:48540 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:41809 CLOSE_WAIT
tcp        0      0 <myhost>:smtp            mailout1.accessco:58641 ESTABLISHED
tcp        1      0 <myhost>:smtp            nmail0.netledger.:57605 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:34448 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:45341 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:59556 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:54432 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:38925 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:40640 CLOSE_WAIT
tcp        0      0 <myhost>:smtp            mailout1.accessco:35344 ESTABLISHED
tcp        0      0 <myhost>:smtp            mailout1.accessco:34112 ESTABLISHED
tcp        1      0 <myhost>:smtp            mailout1.accessco:44640 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:59587 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:46391 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:35079 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:38919 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:53047 CLOSE_WAIT
tcp        0      0 <myhost>:smtp            mailout1.accessco:56359 ESTABLISHED
tcp        1      0 <myhost>:smtp            mailout1.accessco:37286 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:54994 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:53474 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:54923 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:40198 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:56267 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:41256 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imr-d04.mx.aol.co:37640 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            imo-m28.mx.aol.co:63679 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:38677 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:39029 CLOSE_WAIT
tcp        0      0 <myhost>:smtp            mailout1.accessco:57540 ESTABLISHED
tcp        0      0 <myhost>:smtp            mailout1.accessco:37796 ESTABLISHED
tcp        1      0 <myhost>:smtp            imo-m28.mx.aol.co:35086 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:44324 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:35348 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            nmail0.netledger.:56320 CLOSE_WAIT
tcp        1      0 <myhost>:smtp            mailout1.accessco:53556 CLOSE_WAIT
...

_________________
Petition for Better 64-bit ATI Drivers - Sign Here
http://www.petitiononline.com/atipet/petition.html
Back to top
View user's profile Send private message
Corona688
Veteran
Veteran


Joined: 10 Jan 2004
Posts: 1204

PostPosted: Sat Dec 10, 2005 4:16 pm    Post subject: Reply with quote

It turns out I'd managed to break my system logger, too... no wonder. Postfix is being slightly more chatty now, and I've fixed a few config file complaints. Let's see how it works now...
_________________
Petition for Better 64-bit ATI Drivers - Sign Here
http://www.petitiononline.com/atipet/petition.html
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Sat Dec 10, 2005 4:52 pm    Post subject: Reply with quote

It's paramount that you get the syslog as you'll need the logging to see what Postfix is up to. I use syslog-ng and stick the mail logs in /var/log/maillog.

Common problem is Postfix choking on a duff config and then not accepting email. Get the logging working and then tail the logs and you'd see this.

Hope it goes well.
Back to top
View user's profile Send private message
Corona688
Veteran
Veteran


Joined: 10 Jan 2004
Posts: 1204

PostPosted: Sun Dec 11, 2005 7:57 pm    Post subject: Reply with quote

Thank you for pointing me in the right direction! I've finally managed to put a few of the pieces together this time, and now have:
  • A functioning MTA, postfix, which feeds emails into ~/.maildir/
  • Functioning POP3 over SSH, which feeds these maildirs to remote clients
  • fetchmail in my crontab, to check for and download emails from my old address


Hence I no longer need to run kmail all weekend to prevent my ISP's tiny mailbox from filling up.

With all this done though, I've finally realized I forgot something -- smtp services. What would you reccomend as a good SMTP server, which hopefully supports mysql authentication the same way postfix does?
_________________
Petition for Better 64-bit ATI Drivers - Sign Here
http://www.petitiononline.com/atipet/petition.html
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Sun Dec 11, 2005 9:12 pm    Post subject: Reply with quote

What do you want on the SMTP side that Postfix can't provide?
Back to top
View user's profile Send private message
Corona688
Veteran
Veteran


Joined: 10 Jan 2004
Posts: 1204

PostPosted: Tue Dec 13, 2005 3:47 am    Post subject: Reply with quote

OK...that is interesting. It will accept smtp from arbitrary clients, but will not accept it from localhost? I had to force fetchmail to use /usr/lib/deliverquota instead of trying to connect. How do I fix these?
_________________
Petition for Better 64-bit ATI Drivers - Sign Here
http://www.petitiononline.com/atipet/petition.html
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Tue Dec 13, 2005 9:36 pm    Post subject: Reply with quote

Postfix is great until people start trying to configure it :-) It would accept connections from localhost out of the box. postconf -n will let you know what you've changed.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum