Brian Densmore [email protected] wrote on 10/07/2004, 03:33:19 PM:
So what happened with your mail server? Get it working?
It's nearly there! I decided to give exim one more shot, and then move to sendmail if I still can't get it going. Following the advise in several emails, I found a few errors and corrected them. Earlier, for a test, I setup an account in fetchmail to see where _that_ mail would end up, and after correcting my errors, it those messages (from the pop3 account fetchmail was pulling down) ended up in my inbox. (Viewed in mutt.) That was encouraging. New mails to that account also end up in my inbox. So...SOMETHING is working right.
I still can't get local mail (mail -s "testing" mdg) or mail sent straight to [email protected] to get to my inbox though.
The other issues, that I figured I would deal with last, is that reading through the exim logs, I find that some test mails I sent from the [email protected] account are rejected by the recipient server, and it tells me to stop using a dhcp host, and to use my isp's smarthost.
Also, this domain is a dyndns.org domain, and it lets me setup an MX host for this domain. I assume it would be mdg.homelinux.org.
So...great help so far. I'm not quitting this time...I'm getting this thing going if it kills me.
Here is a question that I've wondered about. I see great benefit by using fetchmail and some spam filters together. I have a few pop3 accounts that I check via thunderbird. It seems like I could have my little linux email server checking these for me, filtering the spam, and making the emails availble in an IMAP format (which I prefer.) Knowing that...Can I also _send_ from each of these accounts, through my linux server? That is...if fetchmail is pulling mail from [email protected] and [email protected], and I'm reading them trough an IMAP setup in thunderbird...can I respond to these mails and have them come from [email protected] and [email protected] respectively? It seems like they'd always come from [email protected]. Right?
Matt
Hey everyone:
For some reason, understanding how to run a for-fun email server is beyond me. So, I'm trying to get this configured one step at a time. I find some tutorials online that say..."Yeah, just setup exim, fetchmail, squirrelmail, courier-imap, and spamassassin and you're almost there!" That sounds like a lot to me. So...I'm starting small. First things first, I want to get exim working with courier-imap.
Here is my setup, then I will show the errors I'm getting:
Debain Testing exim courier-imap Timewarner cable mdg.homelinux.org pointing from dyndns.org to my server.
Here is a snip of my exim conf. (the parts that seem relevant)
host_accept_relay = 127.0.0.1 : ::::1 host_auth_accept_relay = * local_delivery: driver = appendfile group = mail mode = 0660 mode_fail_narrower = false envelope_to_add = true return_path_add = true #file = /var/mail/${local_part} directory=${home}/Maildir maildir_format = true prefix="" ===================
My /etc/login.defs file has: QMAIL_DIR Maildir/ #MAIL_DIR MAIL_FILE Maildir/
==================
And my /etc/pam.d file has: session optional pam_mail.so standard noenv dir=~/Maildir
===================
In my home dir, I have a .forward with: ~/Maildir
I also have a folder called Maildir with mdg:mail ownership.
====================
Now, when I log into mutt, and send a test mail somewhere, it works just fine. Comes from [email protected]. When I try to mail back, I get this header: ----- Message header follows -----
Received: by 10.11.98.52 with SMTP id v52mr399875cwb; Mon, 04 Oct 2004 08:47:12 -0700 (PDT) Received: by 10.11.98.53 with HTTP; Mon, 4 Oct 2004 08:47:12 -0700 (PDT) Message-ID: Date: Mon, 4 Oct 2004 10:47:12 -0500 From: Matt Graham Reply-To: Matt Graham To: Matt Graham Subject: Re: Testing In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: ========================
And I see this in my exim log:
2004-10-05 13:08:02 Start queue run: pid=5976 2004-10-05 13:08:02 1CEnRF-0001Pe-00 == ~/Maildir/@mdg.homelinux.org directing defer (-41): retry time not reached 2004-10-05 13:08:02 1CEXlE-000104-00 == ~/Maildir/@mdg.homelinux.org directing defer (-41): retry time not reached 2004-10-05 13:08:02 1CEXfM-0000zL-00 == ~/Maildir/@mdg.homelinux.org directing defer (-41): retry time not reached 2004-10-05 13:08:02 1CEXIh-0000xp-00 == ~/Maildir/@mdg.homelinux.org directing defer (-41): retry time not reached 2004-10-05 13:08:02 1CEXIg-0000xp-00 == ~/Maildir/@mdg.homelinux.org directing defer (-41): retry time not reached 2004-10-05 13:08:02 1CEXcW-0000zA-00 == ~/Maildir/@mdg.homelinux.org directing defer (-41): retry time not reached 2004-10-05 13:08:02 End queue run: pid=5976
========================
There are a number of issues in trying to send mail for various accounts through a home SMTP server.
First, if you read the doccumentation on "virtual domains" for your mailserver, it will tell you how to allow outbound mail to appear to come from some other address than mailserver.homenetwork.net or whatever. This is pretty common, most mailservers have hostnames other than the unqualified domain name that mail appears to be from (homenetwork.net in this case).
Next, you need to deal with the fact that a lot of mail servers are configured to reject connections from servers at IP addresses that are listed as part of the IP pool of an ISP. This is a very crude method of spam blocking, but more and more administrators include it by default in their configurations.
To get around this, you'll have to relay mail for those hosts through your ISP's mailserver. This may be possible on a per-domain basis, your mailer may allow you to fall back to this route if delivery fails, or you may end up routing everything through the ISP's server.
Most ISP's are pretty good about this, but some will object to sending mail that appears to come from somenetwork.com through their ispnetwork.com host. This would allow people to relay mail from illegitimate networks through thier valid network and open them to spam relays if they weren't careful. If you have the bad luck to end up in this situation, and can only send mail that originates from ispnetwork.com, look for another ISP.
My general advice is try it, and if it doesn't work find a way around it.