Link to home
Start Free TrialLog in
Avatar of hulken
hulken

asked on

Setting up sendmail.

I has been some years since I last run sendmail so I have forgot all things that I might want to change in the config-file.

I want to set up a mail server for my-domain.com

* I want the server to masquerade all mails that are sent as they are comming from mydomain.com (the servers domainname is mail.mydomain.com)

* How do I set up which domains to recive mail for?

* how do I set the limit of the size of the mail to say 700MB ( I know... it's a bad idea)

* How do I set up which host's that should be able to use the server. (allow relay)

What Have I forgot now? Any tip on what I need to change for the default config to get sendmain safer?

* Yes... Now I remember the most important thing.

I like all mail's coming to a non exsistent user to be sent to hulken@mydomain.com (no MAILERDEAMON message)



ASKER CERTIFIED SOLUTION
Avatar of samri
samri
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of auther_bin
auther_bin

1.
In /etc/sendmail.cf config all the Items like:
----------------
# who I masquerade as (null for no masquerading) (see also $=M)
DMmail.mydomain.com
----------------
2.
In file: /etc/mail/mailertable, add a line like:

.mail.domain.com relay
mail.domain.com relay

3.
In file: /etc/sendmail.cf change the count in nextline:)
# maximum message size
O MaxMessageSize=1000000

4.Just like answer 2 in file: /etc/mail/mailertable add the host in it.

ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if they are still open in 14 days.  Experts, please post closing recommendations before that time.

Below are your open questions as of today.  Questions which have been inactive for 21 days or longer are considered to be abandoned and for those, your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.
https://www.experts-exchange.com/questions/Q.20102072.html
https://www.experts-exchange.com/questions/Q.20103849.html
https://www.experts-exchange.com/questions/Q.20145561.html
https://www.experts-exchange.com/questions/Q.20169449.html
https://www.experts-exchange.com/questions/Q.20169478.html
https://www.experts-exchange.com/questions/Q.20172645.html
https://www.experts-exchange.com/questions/Q.20177672.html
https://www.experts-exchange.com/questions/Q.20180896.html
https://www.experts-exchange.com/questions/Q.20189306.html
https://www.experts-exchange.com/questions/Q.20192697.html
https://www.experts-exchange.com/questions/Q.20193626.html
https://www.experts-exchange.com/questions/Q.20195237.html
https://www.experts-exchange.com/questions/Q.20244812.html
https://www.experts-exchange.com/questions/Q.20246719.html
https://www.experts-exchange.com/questions/Q.20261121.html
https://www.experts-exchange.com/questions/Q.20261146.html
https://www.experts-exchange.com/questions/Q.20269349.html
https://www.experts-exchange.com/questions/Q.20274432.html
https://www.experts-exchange.com/questions/Q.20289956.html

To view your locked questions, please click the following link(s) and evaluate the proposed answer.
https://www.experts-exchange.com/questions/Q.20181754.html
https://www.experts-exchange.com/questions/Q.20245940.html
https://www.experts-exchange.com/questions/Q.20253492.html

*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations.
If you are interested in the cleanup effort, please click this link
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643 
POINTS FOR EXPERTS awaiting comments are listed in the link below
https://www.experts-exchange.com/commspt/Q.20277028.html
 
Moderators will finalize this question if in @14 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
 
Thanks everyone.
Moondancer
Moderator @ Experts Exchange
7/4/2001 : This looks like another lost soul :)

hulken -->  You logged in today again, and chose not to respond.  Sorry to see that, so I finalized this today.

Moondancer - EE Moderator
Avatar of hulken

ASKER

I still have not got an answer for my point 5 that I wrote was the MOST IMPORTANT THING! (se abowe)

I don't undeerstand you when You mark my question as answerd and accepted when I have not got a answer on the thing that I write is THE MOST IMPORTANT THING!

Btw. it seem like half of the mail about someone have comment/answered my questions never reach me. Do you have some tecnical problems with this? It's not so strange that I don't comment a question if I don't get any mail about it. (I don't mean this question because I don't think you are fair to me right now. I especialy wrote what I considered as most importent and not got any answer on that and you steel my points anyway.
 
I thought you guys was fair but It seems like I was wrong.
:-(


>* Yes... Now I remember the most important thing.

>I like all mail's coming to a non exsistent user to be >sent to hulken@mydomain.com (no MAILERDEAMON
>message)

Avatar of hulken

ASKER

If I especially write that something is the most important thing I don't think that I have to adds any comments when I don't have got any answer for that.
We are always trying to be very fair here, hulken.

Since you obviously have bad feelings here, I have added 200 points to your available points, so the help given here and the points awarded were FREE to you.  Easy questions begin at a value of 50 points, you essentially asked 5 questions within this and the first 4 were given to you more than NINE MONTHS ago, with no feedback from you whatsoever.  This is not what this site is about.  Any question regardless of the context which is "inactive" for 21 days or longer is considered abandoned.

Feel free to post it again to get your "most important 5th question point answered", or not.  Your choice.

Click your member profile please and make sure you have only one and the correct Email address listed there, also verify your address information, etc. to ensure they are correct.  If all of that is correct and you still encounter problems, post a zero point question in the Community Support topic area so we can help you further.

Feel free to Email Administration at ComTech@experts-exchange.com if you continue to feel that this site is anything less than excellent!

Moondancer - EE Moderator
Hulken,

I do have to agree with moondancer, we are here to help, and I happens to know that most of us are doing this at no extra-charge (except the money WE pay to the ISP and telcos to be on-line).  So the thing that drives most of us at "satisfaction", a "thank you..." or "it worked!", is a actually a boost to our morale.

Awarding a 200 pts is very rare, and I would consider that as very thoughtful (can I get that too :)).

Anyway, I would be really happy to get to the original quation, each and every parts.  -- Since the original date of this Q is almost 1 year, and I learned a few tricks (from EE too) since then.

>>* I want the server to masquerade all mails that are sent as they are comming from mydomain.com (the servers domainname is mail.mydomain.com)

my using M4.
MASQUERADE_AS(my-domain.com)
FEATURE(masquerade_envelope)
FEATURE(masquerade_entire_domain)

Or straight hack to sendmail.cf, just add the line (or replace the existing, DM to
DMmy-domain.com


>> * How do I set up which domains to recive mail for?

M4:
FEATURE(`use_cw_file')
and create a file in /etc/mail/sendmail.cw, and add all the domain that has their MX entry in the DNS to point to you sendmail, one domain per line.

Alternately; you can add (modified the Cw option in sendmail.cf) to be
Cwmy-domain.com otherdomain.com abc.com xyz.com

* how do I set the limit of the size of the mail to say 700MB ( I know... it's a bad idea)
M4:
DEFINE(confMAX_MESSAGE_SIZE,`734003200')
in sendmail.cf
# maximum message size
O MaxMessageSize=734003200

And again, the figure is based on 1024*1024*7 (1024bytes* 1024 bytes=1M, 1M * 7 =7M).  Some would just put 7000000 (7 million bytes = 7M).  I do not want to argue (1M=100- bytes, etc. etc.) Hope you got the idea.



* How do I set up which host's that should be able to use the server. (allow relay)
M4:
FEATURE(access_db)
then you need to create a flat file the has two columns separated by tab, and name this file "access"

Assuming that you want to allow relayin for; 10.1.1.1, 1.2.3.4, then you need to add

10.1.1.1 <Tab>RELAY
1.2.3.4  <Tab>RELAY

and built the access.db with this.
makemap hash /etc/mail/access < /etc/mail/access

More "english-like" explanation can be found here.
http://www.sendmail.org/tips/relaying.html
-----straight cut-and-paste from the above link.
For example, a database might contain:

cyberpromo.com  REJECT
sendmail.org    RELAY
spam@buyme.com  550 Spammers shan't see sunlight here

to reject all mail from any host in the cyberpromo.com domain, allow any relaying to or from any host in the sendmail.org domain, and reject mail from spam@buyme.com with a
specific message.

Note that the access database is a map and just as with all maps, the database must be generated using makemap. For example:

makemap hash /etc/mail/access < /etc/mail/access
------------

sendmail.cf ( beats me... I'm not sure).


What Have I forgot now? Any tip on what I need to change for the default config to get sendmain safer?

* Yes... Now I remember the most important thing.

I like all mail's coming to a non exsistent user to be sent to hulken@mydomain.com (no MAILERDEAMON
message)

There is really a few ways to get it done, and it all depends on how your sendmail is configured

Take a look at VirtualHosting page at www.sendmail.org for more detailed (step-by-step, since most of the info I might be typing here would be thre) information.

http://www.sendmail.org/virtual-hosting.html

The fact that I advise to map POSTMASTER: to your own email eddress is that, every mail bounced, a copy will be sent to the Postmaster too.  That sure worked, but not as good as using Vhost.

If you prefer to stick with the Postmaster technique, make sure the following option in your sendmail.cf is enabled.
# who (if anyone) should get extra copies of error messages
O PostMasterCopy=Postmaster

I would personally would advise to work on Vhost, even though you have only one domain

----
I hope these should catch all the IMPORTANT parts that you are looking for (even though it get stuck for almost 1 year).

should your need more information, feel free to add.
take care.
Avatar of hulken

ASKER

Thanks. That was a wounderful Answer.

Now I can switch from Postfix to sendmail.

The strange thing here is that I for some of my questions I don't get any mail about that someone has added a comment. Usually I try to be fast with comments. About 8 months ago I moved out from my Student apartment and where only connected over modem which made that my economical situation didn't allowed me to sit here for some hours. (So when i did not recieved any mail about comments / answers to my questions I did not checked out old questions which I thought did not have new comments)

Now I just got a fast internet access home again so it feels wounderful to get help with this.
Avatar of hulken

ASKER


Moondancer. Could you remove the 200 points from my account since I've got a good ansver or should I award 200 points as a new question for samri?
Avatar of hulken

ASKER


Moondancer. Could you remove the 200 points from my account since I've got a good ansver or should I award 200 points as a new question for samri?
Hello hulken, I see you have been there for about 5 years now.

We have Users and Experts both abandon questions, most were answered and NOT awarded to the Expert who may have answered the questions.  We have so far cleaned up over 135,000 abanonded questions.

The rules here are simple as far as this part is pertinant to you.  21 DAYS without a Post on any question, it is deemed as abandoned.  It is your responsibility to keep up with your own questions whether or not you receive notifications in the email, is no excuse, as you can open your member profile, and every question you ahve asked or aswered.  If the status is anything other than PAQ beside the queston in your member profile, needs to be taken care of.

Regards,
ComTech
CS Admin @ EE