×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

New to sendmail is the a step by step?

New to sendmail is the a step by step?

New to sendmail is the a step by step?

(OP)
New to sendmail is the a step by step?

Thanks.

RE: New to sendmail is the a step by step?

starting where?  With getting a domain name?  Setting up dns "MX" record to point to your ip?  Installing sendmail?  Configuring sendmail?  Securing sendmail?  It is not very complicated and we are willing to answer any question you have but give us a place to start.  Also let us know what type of connection you have to the internet.



RE: New to sendmail is the a step by step?

(OP)
I appologize...in the area of Configuring sendmail?  Securing sendmail? and then adding squirrelmail but I would ask that in a different form right?

Thanks again.

RE: New to sendmail is the a step by step?

You would use apache to give users access to squirrelmail so to answer your question you would ask that in the apache forum.  Now geting back to sendmail.  Although many linux distros come with more than one mail server, sendmail is the one that is usually configured to start at bootup.  That being the case, I won't go into the particulars of setting that up.  Sendmail's main configuration file is /etc/mail/sendmail.mc and is the first thing we will edit.  So open it with your favorite text editor.  The first thing you need to do is look for these two lines:

TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl

If there is a dnl in front of them, that means they are commented out.  The dnl means disregard everything until you come to a new line.  Simply remove the dnl.  The dnl at the end of the line is to get rid of the white space.  Next look for a line like this:

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

Either comment it out, remove it or edit 127.0.0.1 to your server's ip otherwise, sendmail will not look at the network device for mail.

Now you are all done with sendmail.mc but sendmail can't use it like this because a lot of info is missing.  So what we will do now is build the configuration file using a macro compiler called m4.  This takes sendmail.mc and other .mc files and compiles them into sendmail.cf.  To do that issue this command:

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Doesn't get any easier than that does it?  Sendmail needs to know which domain this server will be providing mail for.  To do that open /etc/mail/local-host-names and list all the domains your server will be hosting.  You don't have to do anything to that file other than save it.  Now you will need to make sure saslauthd is running and set to start at bootup.  You will also need a pop3/imap server start at bootup.  I like dovecot.  It doesn't require any configuration at all.  At this point you mail server should be up and running.  However,  the bad news,  You need to create a table of users ant tell sendmail where that users mail goes.  If you have a lot of users, I pitty you.  winky smile  What this table does is allow for virtual user names such as sales, webmaster, admin and so on.  Here is a very short example of what the file looks like.  Basically, each line has a virtual email address and a username or external e-mail address:

webmaster@domain1.com    joe
joe@domain1.com          joe
sales@domain1.com        mike@otherdomain.net
mike@domain1.com         mike
@domain1.com             nouser  This server does not allow spam!

You would do the same for each of your domains.  Notice where some email points to a name.  That name is a user on you linux system  So for example, all mail for webmaster@domain1.com will go to /var/spool/mail/joe where joe is a file that contains all joes mail.  When a user logs into his pop3 account with his username and password, this file get sent to that user's client where the file is converted to the standard email format of individual email messages.  At the bottom, you will notice I added @domain1.com with no user name.  This is a catchall.  If mail comes in and there is no match an error message is returned with the text you put on that line.  When you are done, save the file as /etc/mail/virtusertable.  There may be one allready but it would be blank.  Now you need to create the actual map sendmail will use.  Just issue this command:

makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable.  One more file you need to edit is /etc/aliases.  Notice that most of the names are aliased to root.  Then down at the bottom root is aliases to marc or some other name.  Put you user name there and uncomment the line.  To create /etc/aliases.db, simply type newaliases on the command line.  This should get you up and running.  Now all you need to do is configure your mail client.  What you want to do is tell it to send you username and password to the outgoing server as well as the incoming server.  Let me know if you need more spacific help with that.  Let me know how things turn out and I will help you get spammassassin setup.

  

RE: New to sendmail is the a step by step?

(OP)
RhythmAce,

Thanks i will do all the things you have listed. How do I increase the file size attachments for squirrelmail?

I once had some config files you posted for me a long time ago and I have lost them, but I do know that you have greatly helped me in the past with linux things.

So my hat is off to you and thanks again...

Accessxp.

RE: New to sendmail is the a step by step?

There should be an empty file called /etc/mail/virtusertable.  If not create it as a plain text file then issue this command:

makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable

I'm not sure about how set attachment size in squirrelmail because I haven't used it in years.  I took a quick peek at the config and didn't see it there.  I'm going to guess that is is set in php.ini some place.  Mind you, that is just a guess.



RE: New to sendmail is the a step by step?

(OP)
okay thanks.

RE: New to sendmail is the a step by step?

(OP)
RhythmAce,

Could you help out with spammassassin setup?

Also which form would i ask my squirrelmail questions?


Thanks.

RE: New to sendmail is the a step by step?

The first thing you need to do is make sure spamassassin starts on bootup.  Next we need to tell the localmailer (procmail) to pass all mail to spamassassin.  Edit /etc/procmailrc and add these lines:

CODE

DROPPRIVS=yes
:0fw
| /usr/bin/spamc

Now we ain't gonna have it do nothing fancy.  All we want it to do is mark stuff it thinks is junk mail as [SPAM] deliverer it as it normally would.  So open /etc/mail/spamassassin/local.cf and add these lines:

CODE

required_hits 5
report_safe 0
rewrite_header subject [SPAM]



  Your other options are to put the spam in a special folder on the mail server or just chuck it.  Since the recipient wouldn't have access to these, I just have spamassassin mark them as spam and move along.  There are a lot of ways that you can tell spamassassin what spam looks like but I just want to get you up and running.  There may be people here that can help with with configuring it so it's a little tighter or check their website.  Hope this helps.

 

RE: New to sendmail is the a step by step?

(OP)
why would this show up next to the user name and not the domain name?

@c17-ss-2-lb.cnet.com

RE: New to sendmail is the a step by step?

(OP)
I do not have this fold in that location.

/etc/procmailrc?

RE: New to sendmail is the a step by step?

Quote:


I do not have this fold in that location.

/etc/procmailrc?

um,,, create it.  It's just a stinkin' text file.



RE: New to sendmail is the a step by step?

Quote:


why would this show up next to the user name and not the domain name?

@c17-ss-2-lb.cnet.com

huh?

RE: New to sendmail is the a step by step?

(OP)
I got it thanks.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close