LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-14-2004, 04:42 PM   #1
sendas4
Member
 
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Rep: Reputation: 15
Exim Mail server help.


I work for a small company and we decided on using linux for our mail server. We registered a domain and set up mx records with zonedit.com. Now here is the problem i followed several diffrent tutorals one sendmail one postfix one gmail and now exim. Ive only been using linux for 3 months i can get around good and i thought understand what im reading in most config files but when it comes to mail server config files the terminogy just loses me. this is tutorial im using http://forums.gentoo.org/viewtopic.p...er=asc&start=0 I get lost with all the localdomain and relay domains and i dont know where to enter in the mx records. :/

If anyone could please help me understand this I am more than willing to donate for your time.
 
Old 09-14-2004, 05:04 PM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
OK, let's say your company is smallcompany.com - that would be your local domain. If you decide you also want to receive mail for othercompanynextdoor.com, that would be a relay domain (a domain you want to relay email for - mail addressed to them would be accepted by your server). I think you don't really care about that, so just leave it blank. The only setting you should care about is the relay from - you need to include your local network addresses so that your server won't reject email sent by your users

As for MX records - I thought you said you already set those up? Use nslookup (old) or dig (new) to look up the details for your domain and make sure your server's address is listed as the MX. You don't need to enter any MX details in your own config file.
 
Old 09-14-2004, 05:11 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you are likely to want to just MX to yourself, i.e. no dedicated mail server for now. you want mail for www.pants.com to be handled by pants.com... so just add that into zoneedit.

By itself, Exim is a VERY easy server to configure. I'd suggest getting that running in isolation to the other parts, before you worry about clamav etc... IF indeed you do want to do spam and viral scans within the server...

the default exim config file is virtually good to roll, all you'd want to do is define which domanis you wish to relay for, which is presumably your single domain only..

set the "primary_hostname" variable, and then also the "domainlist localdomains:" bit, probably about 10 lines below along with the right netmasks / hostnames for the internal machines to relay mail out to the world.

after that.... there's really nothing left. Personally my exim world is pretty different from that gentoo thread. i just use a standard imap server (not courier... that confused the whatevers out of me), which means it operates in absolute isolation to exim, as mails just from exim into the normal /var/mail/username directories. for spam, i use spamassasin, running on the same machine as (again) a totally seperate service. for exim to filter through sa, i have enabled this part of the exim config:
Code:
# of the exiscan-acl patch. It specifies on which host and port the SpamAssassin
# "spamd" daemon is listening. If you do not use this condition, or you use
# the default of "127.0.0.1 783", you can omit this option.

spamd_address = 127.0.0.1 783
if you are interested in running it this way (works well for me...) http://duncanthrax.net/exiscan-acl/ it can also link in to clamav etc... according to the site.

but all this later stuff is additional goodies i'd not worry about quite yet....

hope this helps.
 
Old 09-14-2004, 05:24 PM   #4
sendas4
Member
 
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Original Poster
Rep: Reputation: 15
Ok starting to make sense now going to try something. Ya i was confused i thought i had to enter in where my MX record was in the config.
 
Old 09-14-2004, 05:57 PM   #5
sendas4
Member
 
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Original Poster
Rep: Reputation: 15
is this line right?



Code:
domainlist local_domains = @ : mail.mydomain.net : sendas.mydomain.net : localhost
 
Old 09-14-2004, 06:00 PM   #6
sendas4
Member
 
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Original Poster
Rep: Reputation: 15
I get this error when i try and start exim

Code:
sen # /etc/init.d/exim start  * Starting exim... 2004-09-14 15:53:06 Exim configuration error in line 306 of /etc/exim/exim.conf:   error in ACL: unknown ACL condition/modifier in "$dnslist_domain\n$dnslist_text"
 
Old 09-14-2004, 06:19 PM   #7
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Your first line looks right, but if you copy/pasted the config from that site you linked earlier, it looks like there's an error. I think line 306 should be commented out (I think 306 and the line above it were originally one line, but the forum mangled it a little.
 
Old 09-14-2004, 07:18 PM   #8
sendas4
Member
 
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Original Poster
Rep: Reputation: 15
ok cool so i have it running. i just have a couple more questions. i setup with a subdomain called mail.mycompany.net and pointed it to the IP and created a mx record of mail.mycompany.net. Is that right?

and for users. lets say i create a user named mark on the box and it creates a mailbox for mark? or do i have to run a script or something. What is the best way to test if i have everything hooked up right :P
 
Old 09-14-2004, 07:42 PM   #9
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
If you are setting up a courier-IMAP system, you will need to make sure your exim config says to deliver to a Maildir format. The config you linked to uses a directory called ".maildir", so for user mark you should run 'maildirmake /home/mark/.maildir'. I prefer my maildir visible, so I wouldn't use a . at the start, but that's entirely up to you.

To test it... well, send yourself some email Create a new user, send them email too. It's best to send from an external source, say a webmail account (or if you'd like, you can send me a private message with an address, and I'll send you a test, but that would mean trusting an external party with details of your newly set up mailserver, and so probably not the best idea ).

Your DNS/MX setup sounds right from your description. If you do 'dig -t MX yourdomain.com', you should see your subdomain listed as the MX with the lowest number in front of it.
 
Old 09-14-2004, 08:52 PM   #10
sendas4
Member
 
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Original Poster
Rep: Reputation: 15
ok i edit exim.conf to this.

Code:
local_delivery:   
 driver = appendfile  
#  file = /var/mail/$local_part   
 directory = /home/$local_part/maildir   
 maildir_format    
delivery_date_add    
envelope_to_add   
 return_path_add   
group = mail  
# mode = 0660
and i also did this.

Code:
adduser mark -G users,mail
then i set the passwd for mark
then i

Code:
maildirmake /home/mark/maildir
Code:
mkimapdcert
Code:
/etc/init.d/courier-imapd-ssl restart
Code:
/etc/init.d/exim restart
i then opened ports 143 and 25 and pointed them to the mail server.
went to a windows computer and put in mark as username mark@mycompany.net and mail.mycompany.net for imap and smtp. It didnt work. i then tried just using the local lan address of the server. still just hangs.

Last edited by sendas4; 09-14-2004 at 08:54 PM.
 
Old 09-14-2004, 09:03 PM   #11
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
What do you mean by hangs? What happens if you telnet to the server on port 25 (use the ip address for now)?
 
Old 09-14-2004, 09:10 PM   #12
sendas4
Member
 
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Original Poster
Rep: Reputation: 15
well outlook says sending mail complete then the next step is checking mail and it just keeps trying forever. But im not getting the mail im tyring to send.

when i telnet on port 25 i get 220 sen.mycompany.net ESMTP Exim 4.41 Tue 14 Sep 2004 19:02:22 -0700
 
Old 09-14-2004, 09:19 PM   #13
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
In the properties for your IMAP account, on the imap tab, is your "root folder path" set to 'inbox'? If not, set that and try again. To see if the mail was delivered properly, look in /home/mark/maildir/new and see if there's a file in there - if there is, check the contents; it should be your email. This will determine whether the problem is the mail server or outlook's configuration.

p.s: I've given you the location of the root folder path setting in Outlook Express, not Outlook - if you're using full Outlook you may have to hunt around for it... I haven't used Outlook for many years (many very happy years...).
 
Old 09-14-2004, 09:36 PM   #14
sendas4
Member
 
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Original Poster
Rep: Reputation: 15
hmm i set the root folder but it doesnt seem to be logging on. maybe im doing something wrong with SSL? oh i would like to PM you but it tells me You do not have permission to access this page when i click on PM
 
Old 09-14-2004, 09:49 PM   #15
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Sorry about the PM thing, I do have my options set to allow it, so I don't know why it doesn't work :/

Was the message delivered to mark's maildir correctly?

Normally port 143 is IMAP without SSL (993 is used with SSL) - try disabling SSL in outlook, at least for testing. Once the server is set up properly, with the right root folder, you can look at making sure SSL works.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problems using make with exim mail server SolidSnake Linux - Networking 2 01-03-2004 03:24 PM
Exim Mail Server mairul Debian 16 12-28-2003 01:36 PM
exim mail server cirofren Linux - Networking 8 12-15-2003 10:44 PM
Exim masquerading mail to AOL users with broadband SMTP server llamakc Linux - General 0 12-13-2003 08:58 AM
exim/fetchmail no mail from POP3 server --->> local user ! help required! realos Linux - Networking 0 04-03-2003 04:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:42 AM.

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
Open Source Consulting | Domain Registration