Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
email relaying
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
overcast
n00b
n00b


Joined: 15 Dec 2003
Posts: 43

PostPosted: Tue Jun 29, 2004 3:41 pm    Post subject: email relaying Reply with quote

i'm sure the answer i need has been covered a hundred times before, but i've been unable to find it by searching so please humor me.

i've just taken a new job and i've got a bit of a mess on my hands. what i have here is an exchange server. right now some users have a legit POP3 account at the ISP which the exchange server dumps into their mailbox. other users share a generic POP3 account and the exchange server seperates any emails on which the addressee match a local user name and dumps them into the appropriate mailbox. anything that does not match a local user stays in the generic account. what i want to do, instead of allowing the exchange server to have first crack at external mail, is to have this gentoo machine get it first and then pass it on, *unmangled*, to the exchange server.

once that's up and working i'll worry about getting a virus scan and spamassassin working, but one step at a time.

i've got fetchmail set up to grab from that big generic account right now. i thought it would be as simple as using the smtphost option to route it over to the exchange server, but that requires you to specify the destination account and even though I can force the destination to be whatever I want, I have no idea how i could make it just use whatever account was listed on the original email.

so i'm guessing i'll need to let fetch drop the mail right on the linux box and then use sendmail and/or procmail to move it to exchange?
Back to top
View user's profile Send private message
jimcooncat.
n00b
n00b


Joined: 25 Mar 2004
Posts: 21

PostPosted: Tue Jun 29, 2004 5:00 pm    Post subject: Reply with quote

I'm using qmail, and can see how to do this easily, but having had to do a lot of research to make it work properly, I don't suggest you use this product. Exim or Postfix would probably work better for you as an intermediary.

I've found that you should keep mail as separate as possible all the way along the route. For instance, if you fetch joe@user.com's mail from his private POP account, then keep it going straight to joe instead of dumping it into a central pool and trying to sort it out after. This helps handle problems that bcc'd mail causes, or if joe set up forwarding from another account on his own. How would your central pool know how to handle joseph@user.net if joe had set it up to forward to joe@user.com? It's just too hard to keep up with this, even in a small office.

Along these same lines, separate the email out from pooled addresses as early as possible. That means set up all your aliases on the linux box, then forward the email directly to the exchange box specifying the username. Don't try to have some aliases defined in your linux server, and some in the exchange server -- too hard to keep track.

And there's no need to dump mail in storage on the linux box unless you want to, just a forwarding setup would work.

I didn't answer your question, but hope I gave you some things to think about!
_________________
— JimCooncat
Fly-by-Night Operations Empowerment Advocate
Back to top
View user's profile Send private message
RAPUL
l33t
l33t


Joined: 29 Dec 2002
Posts: 664
Location: Valencia (SPAIN)

PostPosted: Tue Jun 29, 2004 5:02 pm    Post subject: Direct relay... Reply with quote

¿Can you just use the gentoo box to receive all the mail and then relay it to the exchange server instead of using fetchmail...?

I mean you change the exchange box for the gentoo box. A qmail would be enough. All mail comes to the gentoo mail server which relays it to the exchange server.

Maybe it is some work but it could be worth...
_________________
Entropy rulz world.
Redundancy sux.
World is full of redundancy.
World sux.
Back to top
View user's profile Send private message
georwell
Guru
Guru


Joined: 25 Jun 2003
Posts: 430
Location: Uppsala, Sweden

PostPosted: Tue Jun 29, 2004 5:57 pm    Post subject: Reply with quote

Check out mailscanner. It will simplify your life. Here is a link on setting up a box in front of exchange. There is plenty more documentation available as well. This is just from a quick google search.

http://www.sng.ecs.soton.ac.uk/mailscanner/serve/cache/152.html
Back to top
View user's profile Send private message
overcast
n00b
n00b


Joined: 15 Dec 2003
Posts: 43

PostPosted: Wed Jun 30, 2004 2:29 pm    Post subject: Reply with quote

I got it to do what I wanted. All I needed was that stupid "to..." line. I must have read the man page a good 15x and somehow skipped or misunderstood that part every time.

Code:
poll mail.warwick.net
        user XXXXXXXX is companyemail here
                to carlm chris edward hannah jean jennifer jerry jim kathyr phil renay sue theresa tracy here
                password XXXXXXXX


i'm having a number of unpleasant oddities, but everyone is getting their mail. if an email is addressed to, for example, both edward and jerry, they'll each get 2 copies of it.

in addition, something is generating bounces stating that "root@associatedmutual.com" could not be found. i haven't figured out what yet.
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Wed Jun 30, 2004 2:46 pm    Post subject: Reply with quote

I tend to send up an individual line for each each usr:
Code:

         poll  mail.warwick.net proto pop3
                 user "COMPANY_LOGIN_1" with pass "SECRET_1" is "carlm" here
                 user "COMPANY_LOGIN_2" with pass "SECRET_2" is "renay" here
                 user "COMPANY_LOGIN_n" with pass "SECRET_n" is "nth_user" here
Back to top
View user's profile Send private message
overcast
n00b
n00b


Joined: 15 Dec 2003
Posts: 43

PostPosted: Wed Jun 30, 2004 2:57 pm    Post subject: Reply with quote

I do have a seperate line for each user. The problem is only some of the users have remote accounts and the rest of us share a multidrop. the multidrop is that big ugly line at the beginning. i don't think there's any way around that.
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Wed Jun 30, 2004 3:10 pm    Post subject: Reply with quote

I apologize. I haven't had my first coffee yet and didn't even read the multidrop part :oops:
Back to top
View user's profile Send private message
overcast
n00b
n00b


Joined: 15 Dec 2003
Posts: 43

PostPosted: Wed Jun 30, 2004 3:15 pm    Post subject: Reply with quote

this is my entire /etc/fetchmailrc file (censored, of course)

for some reason the users "joan" and "carl" are not receiving email. it's bouncing. i'd think something was wrong with the "ruser is luser here" translation but it's working fine for everyone else.

Code:
set daemon 60
set postmaster "carlm"
set no bouncemail
set logfile /var/log/fetchmail

defaults
        proto pop3
                smtpaddress associatedmutual.com
                smtphost 192.168.250.1

poll mail.warwick.net
        user xxxxxxxx to 'insurit'='companyemail' carlm chris edward hannah jean jennifer jerry jim kathyr phil renay sue theresa tracy here
                password xxxxxxxx
        user xxxxxxxx is garyb here
                password xxxxxxxx
        user xxxxxxxx is zane here
                password xxxxxxxx
        user xxxxxxxx is diane here
                password xxxxxxxx
        user xxxxxxxx is bonnie here
                password xxxxxxxx
        user xxxxxxxx is celeste here
                password xxxxxxxx

poll mail.associatedmutual.com
        user xxxxxxxx
                password xxxxxxxx
        user xxxxxxxx
                password xxxxxxxx
        user xxxxxxxx
                password xxxxxxxx
        user xxxxxxxx
                password xxxxxxxx
        user xxxxxxxx
                password xxxxxxxx
        user xxxxxxxx is joan here
                password xxxxxxxx
        user xxxxxxxx
                password xxxxxxxx
        user xxxxxxxx
                password xxxxxxxx
        user xxxxxxxx is kathys here
                password xxxxxxxx
        user xxxxxxxx is carl here
                password xxxxxxxx
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