怎么没有找到sendmail的配置文档啊?

由 zeroIIx 在 02-19-2004 10:37 发表:

怎么没有找到sendmail的配置文档啊?

斑竹们,指点一下


由 Snoopy 在 02-19-2004 12:55 发表:


装了没有?rpm -qa |grep sendmail

locate sendmail.cf

一般是在/etc/mail/sendmail.cf


And then in the evening light, when the bars of freedom fall

I watch the two of you in the shadows on the wall

How in the darkness steals some of the choices from my hand

Then will I begin to under


由 zeroIIx 在 02-19-2004 19:51 发表:


我的意思是这里有没有sendmail的配置帖子howto


由 Snoopy 在 02-19-2004 20:42 发表:


你先装,有问题再问,,,精华有!


And then in the evening light, when the bars of freedom fall

I watch the two of you in the shadows on the wall

How in the darkness steals some of the choices from my hand

Then will I begin to under


由 zeroIIx 在 02-19-2004 20:49 发表:


sendmail安装了,精华里好象没有的

我前面搜索过


由 ruochen 在 02-20-2004 09:55 发表:


我原来也找了!好象这里不多的!~主要是很多人都认为安全性不好吧!~

用google看看!~


samaung753dfx+msikt333+duron1.2+128ram+GF2 400+st60G+ecom+samsung52cdrom

+rt8139

winxp+2000server+freebsd5.1+fedora1.0+debian3.0


由 terminator 在 02-20-2004 11:28 发表:


I wrote it almost two years ago, but it should still be useful, especially the part to create sendmail.cf from the .mc file.

Terminator

May 18, 2001

I guess a lot of people might be interested in building their own internet

domain free of charge. Well, it's possible if we do not mention something, such

as power supplier...

First of all, you need these things:

. A PC, at least 486, with at least 32M memory and 1G harddisk.

. Linux, FreeBSD or other free UNIX-like operating system installed on

your PC.

. A cable to connect to the Internet all day and night.

. Stable power supplier which enables your PC run 24x7 hours.

Well, now you are almost ready to create and administrate of your own

internet domain. Feel excited? But wait, it's not so simple to be an

administrator. You might meet all kinds of problems you have not expected. So

please remember, passion, initiative and curiosity are always your friends to

reach the finally success.

Now you can apply for an free domain somewhere, such as www.dhs.org. You

should at least get two static host name with a static domain. Let's assume

they are:

. host1.dhs.org, ip 192.9.200.1, MX mail.domain.dhs.org

. host2.dhs.org, ip 192.9.200.2, MX mail.domain.dhs.org

. domain.dhs.org, dns server 1, ns.domain.dhs.org, ip 192.9.200.1

dns server 2, ns1.domain.dhs.org, ip 192.9.200.2

Set the MX record of host1 and host2 so that they point to the mail server

in your domain, say mail.domain.dhs.org. But wait, you might think where's the

host mail.domain.dhs.org? Actually, they are host1 or host2. I will show you

how to do it.

Now, go to get Internet domain server package Bind. Build and install

it on your system. In your Bind database, add the following records:

domain.dhs.org. IN NS ns.domain.dhs.org.

ns.domain.dhs.org. IN A 192.9.200.1

mail.domain.dhs.org. IN A 192.9.200.1

www.domain.dhs.org. IN A 192.9.200.1

ns1.domain.dhs.org. IN A 192.9.200.2

mail1.domain.dhs.org. IN A 192.9.200.2

www1.domain.dhs.org. IN A 192.9.200.2

domain.dhs.org. IN MX 10 mail.domain.dhs.org.

IN MX 20 mail1.domain.dhs.org.

*.domain.dhs.org. IN MX 10 mail.domain.dhs.org.

IN MX 20 mail1.domain.dhs.org.

OK, at the next 6am, you domain will be ready since all the changes made

at www.dhs.org will be refreshed at 6am each day. You can ping your hosts via

its new DNS name.

You don't have to have two computers with two IPs, actually just have

192.9.200.1 online is fine. However, you can let your PC have two IPs if your

system support IP aliases. After you enable IP aliases, remember to add these

lines in your /etc/hosts:

192.9.200.1 host1.dhs.org host1

192.9.200.2 host2.dhs.org host2 # not necessary if without IP aliases


Next is to make your web server ready. It's quite easy. Just get Apache,

build and install it. Apache support virtual domain, which means you can provide

different web contents from different directories by just running one Apache

server. For example:

http://www.domain.dhs.org/ -> apache_root_dir/www1/

http://www1.domain.dhs.org/ -> apache_root_dir/www2/


Finally, you want to receive e-mail via [email protected] , don't you? It's

also strightforward if you knows how to configure sendmail. But since it's said

that sendmail is the last nightmare to system administrators, I will give you

some hints here to make it a little bit easier.

Ok, let's first download the latest version of sendmail from www.sendmail.

org, compile and install it on your PC.

According to the configuration of your domain, the Sendmail should be able

to receive mail to these address:

. [email protected]

. [email protected]

. [email protected]

. myaccount@ www.domain.dhs.org

Luckily, Sendmail already has this feature. You can set the hostdomain name

in file /etc/mail/local-host-name, one name per line, just as:

domain.dhs.org

host1.dhs.org

host2.dhs.org

mail.domain.dhs.org

And don't forget to add these host/domain name into file /etc/mail/relay-domains

so that Sendmail can relay incoming mail to these host/domain.

After these steps, we can create our own m4 file which is used to create

our sendmail.cf later. In my experience, it's quite easier to create sendmail.cf

with all features we want than modify the sendmail.cf manually.

Your m4 file perhaps looks like this:

############ m4 file starts here #########################

put this file in sendmail_src_dir/cf/cf/

include(`../m4/cf.m4')

you can change this description to anything else

VERSIONID(`linux for smtp-only setup')dnl

change linux to the os type you are running

OSTYPE(linux)

redefine statistics file location, not necessary

define(STATUS_FILE', /etc/mail/statistics')dnl

redefine local mailer location

define(LOCAL_MAILER_PATH', /usr/bin/mail')dnl

redefine procmail mailer location, some os needs this, ie. IRIX

define(PROCMAIL_MAILER_PATH', /usr/local/bin/procmail')dnl

wanna reject spam mail? try this!

FEATURE(access_db', hash /etc/mail/access')dnl

enable relay from certain mail sender

FEATURE(relay_mail_from)dnl

enable procmail

FEATURE(local_procmail)dnl

wanna map incoming mail whose destination address is [email protected] .

org to [email protected] ? try this!

FEATURE(virtusertable', hash /etc/mail/virtusertable')dnl

wanna map outgoing mail whose source address is [email protected] to

[email protected] ? try this!

FEATURE(genericstable', hash /etc/mail/genericstable')dnl

GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl

misc option

FEATURE(always_add_domain)dnl

for /etc/relay-domains

FEATURE(use_cw_file)dnl

disable msa services

FEATURE(no_default_msa)dnl

masquade as domain.dhs.org

MASQUERADE_AS(`domain.dhs.org')

MASQUERADE_DOMAIN(`host1.dhs.org')

MASQUERADE_DOMAIN(`host2.dhs.org')

LOCAL_DOMAIN(`domain.dhs.org')

redefine daemon type and port, just in case

DAEMON_OPTIONS(`Port=smtp, Name=MTA, M=E')dnl

following lines are security reason

to confuse attackers. ;-)

define(confSMTP_LOGIN_MSG', $j Postfix ready at $b')

disable some SMTP command

define(confPRIVACY_FLAGS', authwarnings,noexpn,novrfy,restrictmailq')

res

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus