[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Setup @mydomain.com mail

Posted on 2004-11-09
12
Medium Priority
?
335 Views
Last Modified: 2010-04-20
Hi all

Hi can I setup that all mail send to x@mydomain.com will be accepted.

How can I setup which ones are recognized and all that

And if I want to redirect redirect@mydomain.com to redirected@otherdomain.com


Linux version: Fedora Test 3


With kind regards




Ramses (x_terminat_or_3)
0
Comment
Question by:x_terminat_or_3
  • 6
  • 3
  • 2
  • +1
12 Comments
 
LVL 2

Expert Comment

by:garak1357
ID: 12538589
This depends upon what software you are using for your mail server.  I recommend ditching Sendmail which is installed by default on most every Linux flavor in favor of Qmail.  You can find step by step instructions for every major Linux flavor at:

http://www.qmailrocks.org

Hope this helps.
0
 
LVL 2

Author Comment

by:x_terminat_or_3
ID: 12538767
Garak, I just invested 12$ on a book on sendmail.  Could you give me the WHY I should ditch sendmail?
0
 
LVL 31

Expert Comment

by:rid
ID: 12538875
"Hi can I setup that all mail send to x@mydomain.com will be accepted."

You need to have a registered domain name and you need to have an MX record in the DNS entry for your domain name. Talk to whomever holds your DNS.
/RID
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 2

Author Comment

by:x_terminat_or_3
ID: 12538921
You need to have a registered domain name --> I HAVE
and you need to have an MX record in the DNS entry for your domain name --> HAVE ALSO

Talk to whomever holds your DNS --> That takes up to a week to get a reply...  hence my question here
0
 
LVL 31

Expert Comment

by:rid
ID: 12538995
If the DNS issue is OK, you don't need to talk to them...

The rest is sendmail configuration. If you have a book on the program, you should use it. Sendmail is powerful, but not as easy to set  up as e.g. Postfix.

I suppose you need to look at whatever firewall is involved here, allowing port 25 traffic and such.
/RID
0
 
LVL 2

Author Comment

by:x_terminat_or_3
ID: 12539028
yeah but I mean I just started it and it is going to take a while before I digested all of it.  You mean sendmail can handle ALL the things I want?
0
 
LVL 3

Assisted Solution

by:255x4
255x4 earned 2000 total points
ID: 12539425
__Begin Quote__
yeah but I mean I just started it and it is going to take a while before I digested all of it.  You mean sendmail can handle ALL the things I want?
__End Quote__

Yes.

Please see:

http://www.experts-exchange.com/Operating_Systems/Linux/Q_20892544.html

for something like this.  I think the problem you have right now is that sendmail is either a)not running, or b)running but is not actually doing much of anything for you.

Most of the work you want, is to be done in the /etc/mail/aliases file.  When you finish editing the file, you just issue the newaliases command that that finishes it.

Here is an example aliases file for you:
x: x
redirect: redirected@otherdomain.com
*: /dev/null

This will send x@mydomain.com to the user x, redirect@mydomain.com to redirected@otherdomain.com and everything else to /dev/null (a null set of registers which might increase the entropic state of the universe, but we don't care about that right now).

Thanks,

255x4
0
 
LVL 2

Author Comment

by:x_terminat_or_3
ID: 12541565
4F

So

*: undefined@otherdomain.com

will send all unrecognized mails to undefined@otherdomain.com right?

But what happens with the mail that's accepted.  Is it placed in the /var/spool/mail folder?
0
 
LVL 3

Assisted Solution

by:255x4
255x4 earned 2000 total points
ID: 12548849
Well, it depends on which mail delivery system you use.  Sendmail in and of itself does not care how mail is delivered locally, it only hands it off to a program.

This is defined by the configuration file's Mlocal setting.  This works for all local accounts (like root or X or whatever) while Mprog is used to launch a program for delivery that is non-local.

Look and see if you have /usr/lib/mail.local, if not, then look for /bin/mail, maybe even wheris deliver, or whereis procmail.  The /bin/mail is an older delivery system while /usr/lib/mail.local is a more common system, with deliver and procmail alternatives.  Procmail is what we use here at work on the email server for filtering out spam (as best we can) and other delivery options.

If worse come to worse and you have none of those programs, then you can always tell sendmail to append the emails to a file in aliases:

x: /home/x/mail

This would tell sendmail to put all email to x@themachine into the /home/x/mail file.  You can make this any file you want.

Thanks,

255x4
0
 
LVL 2

Author Comment

by:x_terminat_or_3
ID: 12548951
FF FF FF FF (255x4)

do you mean that sendmail also acts as receiver for mails that come from internet?  Like if you send a mail to blabla@mydomain.com and the dns has an mx pointing to 69.110.xx.xx (me) ... the message will be received by 'sendmail' ?
0
 
LVL 3

Accepted Solution

by:
255x4 earned 2000 total points
ID: 12549957
Yes.

See, sendmail sits waiting for incoming connections as a SMTP server.  This means people trying to send out from the machine and other machines trying to send to your machine.  Sendmail doesn't care which direction the mail is going.  If the mail is for local delivery, the Mlocal applies, if not, then it depends on if:

a) it is local going out
b) from another machine going elsewhere and that machine is included in the RELAYS file

From those two, it depends on the format (tcp/ip, uucp, etc).

So, to answer your question, yes, it acts as the receiver for mail on the internet, but just SMTP kinda receiving, not POP3 for you to get your emails from another machine.

Thanks,

255x4
0
 
LVL 2

Author Comment

by:x_terminat_or_3
ID: 12552385
Thanks for letting me understand better
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month19 days, left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question