Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

E-Mail services on personal workstation

8 views
Skip to first unread message

Michaël Grünewald

unread,
Sep 16, 2007, 7:01:54 AM9/16/07
to
How so you set up E-Mail services for a personal workstation? I
thought that I could find tips my self, but I actually need some help
to get pointers.

Here is the plot:

My home workstation is running 6.2-RELEASE and is connected on a
private LAN. The LAN is connected to the Internet by the means of a
dedicated hardware provided by the ISP (it is a small router that do
NAT and DHCP --- I do not use the latter).

I would like to set up the things so that:
* the machine periodically fetch mail from various mailboxes (I do
this with cron and fetchmail, but I do not hang on this);
* the machine handles local mail (from daemons);
* the machine uses the ``outgoing mail server'' managed by my ISP.

I tried to use ssmtp as suggested by the handbook (24.8 Setting Up to
Send Only) but I am not smart enough (1) to explain him that `michael'
is a local user so that mail destinated to him should mot be sent to
the mail hub, (2) to let fetchmail drop correctly the mail with
fetchmail.

Any pointers for an adequate documentation/tool would be very
appreciated!
--
Cheers,
Michaël

Ditch Brodie

unread,
Sep 16, 2007, 8:19:16 AM9/16/07
to \"Michaël Grünewald\"

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

If you're trying to do what I think you are doing then sendmail,
postfix, etc... will work. BUT (why does everyone have a big but)

Most ISP's are going to be blocking port 25, which means you will
have difficulty sending mail out directly from your server to the
Internet. Local mail is not a problem, but sending it out to the
world is usually blocked by your ISP because they want to limit
spammers abillity to setup mailservers that would send out
millions of e-mail messages.

My ISP is Comcast and I use sendmail. Comcast blocks port 25.
But I get around this by adding a single line file called
/etc/mail/mailertable which contains the name of Comcast's
smtp server. I can use my local server to send mail out but
it relays off of Comcast's smtp server. It works fine and
Comcast doesn't care unless I start sending millions of
messages...then they might give me a call or cutoff my
service.

If you're looking for an e-mail client, then I will sugest
the one that runs with Opera. The Opera web browser comes with
a built-in mail and news client which I'm using right now and
it's great. There are others available, check the ports.

Michaël Grünewald

unread,
Sep 16, 2007, 8:38:09 AM9/16/07
to
"Ditch Brodie" <dbr...@msn.com> writes:

> If you're trying to do what I think you are doing then sendmail,
> postfix, etc... will work. BUT (why does everyone have a big but)
>
> Most ISP's are going to be blocking port 25, which means you will
> have difficulty sending mail out directly from your server to the
> Internet. Local mail is not a problem, but sending it out to the
> world is usually blocked by your ISP because they want to limit
> spammers abillity to setup mailservers that would send out
> millions of e-mail messages.
>
> My ISP is Comcast and I use sendmail. Comcast blocks port 25.
> But I get around this by adding a single line file called
> /etc/mail/mailertable which contains the name of Comcast's
> smtp server. I can use my local server to send mail out but
> it relays off of Comcast's smtp server. It works fine and
> Comcast doesn't care unless I start sending millions of
> messages...then they might give me a call or cutoff my
> service.

Thank you very much for this precise indication. Sendmail is a complex
system, and uncharted territory for me. You saved me a lot of time!



> If you're looking for an e-mail client, then I will sugest
> the one that runs with Opera. The Opera web browser comes with
> a built-in mail and news client which I'm using right now and
> it's great. There are others available, check the ports.

I do use Gnus (from Emacs), and it's perfect for me, but I must admit
I did not tried anything else in my life!

Thank you again for your appreciated clues.
--
Best regards,
Michaël

Bob Eager

unread,
Sep 16, 2007, 9:17:18 AM9/16/07
to
On Sun, 16 Sep 2007 12:19:16 UTC, "Ditch Brodie" <dbr...@msn.com>
wrote:

> On Sun, 16 Sep 2007 07:01:54 -0400, "Michaël Grünewald"
> <michaelg...@yahoo.fr> wrote:
> > I would like to set up the things so that:

> > * the machine uses the ``outgoing mail server'' managed by my ISP.

> Most ISP's are going to be blocking port 25, which means you will


> have difficulty sending mail out directly from your server to the
> Internet.

Yes, but he already says he's not wanting to do that!
--
Bob Eager
UNIX since v6..
http://tinyurl.com/2xqr6h

Bill Vermillion

unread,
Sep 16, 2007, 10:48:54 AM9/16/07
to
In article <868x76i...@Llea.celt.neu>,

=?iso-8859-1?q?Micha=EBl_Gr=FCnewald?= <michaelg...@yahoo.fr> wrote:
>"Ditch Brodie" <dbr...@msn.com> writes:

>> If you're trying to do what I think you are doing then sendmail,
>> postfix, etc... will work. BUT (why does everyone have a big but)

>> Most ISP's are going to be blocking port 25, which means you will
>> have difficulty sending mail out directly from your server to the
>> Internet. Local mail is not a problem, but sending it out to the
>> world is usually blocked by your ISP because they want to limit
>> spammers abillity to setup mailservers that would send out
>> millions of e-mail messages.

>> My ISP is Comcast and I use sendmail. Comcast blocks port 25.
>> But I get around this by adding a single line file called
>> /etc/mail/mailertable which contains the name of Comcast's
>> smtp server. I can use my local server to send mail out but
>> it relays off of Comcast's smtp server. It works fine and
>> Comcast doesn't care unless I start sending millions of
>> messages...then they might give me a call or cutoff my
>> service.

>Thank you very much for this precise indication. Sendmail is a complex
>system, and uncharted territory for me. You saved me a lot of time!

Sendmail - in the default install - really is pretty simple from a
users point of view IMO. It just works.

The other reply says to use the mailertable - and I do use one
to send mail to different domains which won't accept my port 25.

mailertable is handy if you can send out of port 25 to different
servers but are blocked by some. That way you can put the domain
to which you wish to send and enter that and it's mailer into
that file. For things that are a bit weird I basically use two
different mailers - one from the ISP and another for an ISP I
maintain, but have no direct connetion to.

However, you can edit the sendmail.cf and find the DS entry
for 'smart mailer' and put in your ISPs mailer there. That
way you don't need mailertable.

I suspect setting this will be the quickest and easiest way for
you.

>> If you're looking for an e-mail client, then I will sugest
>> the one that runs with Opera. The Opera web browser comes with
>> a built-in mail and news client which I'm using right now and
>> it's great. There are others available, check the ports.

>I do use Gnus (from Emacs), and it's perfect for me, but I must admit
>I did not tried anything else in my life!

Another mail-agent I like is 'mutt' the mongrel of all MUAs.

Bill

--
Bill Vermillion - bv @ wjv . com

Warren Block

unread,
Sep 16, 2007, 11:17:45 AM9/16/07
to
Michaël Grünewald <michaelg...@yahoo.fr> wrote:
> How so you set up E-Mail services for a personal workstation? I
> thought that I could find tips my self, but I actually need some help
> to get pointers.
>
> Here is the plot:
>
> My home workstation is running 6.2-RELEASE and is connected on a
> private LAN. The LAN is connected to the Internet by the means of a
> dedicated hardware provided by the ISP (it is a small router that do
> NAT and DHCP --- I do not use the latter).
>
> I would like to set up the things so that:
> * the machine periodically fetch mail from various mailboxes (I do
> this with cron and fetchmail, but I do not hang on this);

I haven't tried it, but the Handbook has some information on this:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/smtp-dialup.html

> * the machine handles local mail (from daemons);

sendmail should do that automatically. You may need to adjust settings
to send the reports to your user rather than root. You can do that with
/etc/mail/virtusertable. For the periodic system reports, you can set
it in /etc/periodic.conf.

> * the machine uses the ``outgoing mail server'' managed by my ISP.

That's the

define(`SMART_HOST', `relay.example.net')

line in the Handbook entry above. Of course, you'd use the smarthost
provided by your ISP instead of relay.example.net.

One tip: FreeBSD makes sendmail easier with the Makefile in /etc/mail.
To generate a starting .mc file (as root):

cd /etc/mail
make

That only needs to be done once.

After editing that (hostname).mc file as needed, install it and restart
sendmail:

make install restart

--
Warren Block * Rapid City, South Dakota * USA

Michaël Grünewald

unread,
Sep 16, 2007, 7:11:49 PM9/16/07
to
Warren Block <wbl...@wonkity.com> writes:

> > * the machine uses the ``outgoing mail server'' managed by my ISP.
>
> That's the
>
> define(`SMART_HOST', `relay.example.net')
>
> line in the Handbook entry above. Of course, you'd use the smarthost
> provided by your ISP instead of relay.example.net.

Thank you very much for your precise answer.

Now the mail system on the workstation ``just works'' and I am pretty
satisfied with it. However, I would like to add a final touch: I gave
names to computers on my private (home) network, but these names are
not meaningful on the public side of the network. It would be clean
style to prevent sendmail let mail with private hostnames in the
envelope slip out to the ISP mail-hub. If I could I would tell him
``blindly change local addresses to m...@yahoo.fr on outgoing messages''
but I have no idea how to do this. I dived into
`/usr/share/sendmail/cf/README', but didn't find anything suiting my
wishes (the closer thing seems the MASQUERADE_AS option, but it is
actually quite distant).


I also want to express sincere gratitude to the ones
that gave me clues here.
--
All the best,
Michaël

Warren Block

unread,
Sep 16, 2007, 7:33:02 PM9/16/07
to
Michaël Grünewald <michaelg...@yahoo.fr> wrote:
> Now the mail system on the workstation ``just works'' and I am pretty
> satisfied with it. However, I would like to add a final touch: I gave
> names to computers on my private (home) network, but these names are
> not meaningful on the public side of the network. It would be clean
> style to prevent sendmail let mail with private hostnames in the
> envelope slip out to the ISP mail-hub. If I could I would tell him
> ``blindly change local addresses to m...@yahoo.fr on outgoing messages''
> but I have no idea how to do this. I dived into
> `/usr/share/sendmail/cf/README', but didn't find anything suiting my
> wishes (the closer thing seems the MASQUERADE_AS option, but it is
> actually quite distant).

MASQUERADE_AS will change the domain part; there are probably spam
filtering implications if you masquerade messages as coming from some
other site. You will probably also want MASQUERADE_ENVELOPE.

As for changing the username, this may help:

http://listserver.uk.freebsd.org/pipermail/freebsd-users/2002-May/005817.html

Rob Warnock

unread,
Sep 16, 2007, 9:25:14 PM9/16/07
to
Michaël Grünewald <michaelg...@yahoo.fr> wrote:
+---------------

| "Ditch Brodie" <dbr...@msn.com> writes:
| > My ISP is Comcast and I use sendmail. Comcast blocks port 25.
| > But I get around this by adding a single line file called
| > /etc/mail/mailertable which contains the name of Comcast's
| > smtp server. I can use my local server to send mail out but
| > it relays off of Comcast's smtp server. It works fine...

|
| Thank you very much for this precise indication. Sendmail is a complex
| system, and uncharted territory for me. You saved me a lot of time!
+---------------

You might also consider switching to Postfix. I did back in 2003
and have never regretted it. I find it *much* easier to configure
than Sendmail, especially given the "virtual_alias_maps" feature.


-Rob

-----
Rob Warnock <rp...@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607

Bob Eager

unread,
Sep 17, 2007, 2:39:55 AM9/17/07
to
On Mon, 17 Sep 2007 01:25:14 UTC, rp...@rpw3.org (Rob Warnock) wrote:

> You might also consider switching to Postfix. I did back in 2003
> and have never regretted it. I find it *much* easier to configure
> than Sendmail, especially given the "virtual_alias_maps" feature.

Hear, hear, hear....!

Michaël Grünewald

unread,
Sep 17, 2007, 7:10:03 AM9/17/07
to
Warren Block <wbl...@wonkity.com> writes:

> MASQUERADE_AS will change the domain part; there are probably spam
> filtering implications if you masquerade messages as coming from some
> other site. You will probably also want MASQUERADE_ENVELOPE.
>
> As for changing the username, this may help:
>
> http://listserver.uk.freebsd.org/pipermail/freebsd-users/2002-May/005817.html

Thank you for that link.

I followed the instructions you pointed out to me, but I cannot
achieve the desired effect. I added

FEATURE(genericstable, `hash -o /etc/mail/genericstable')dnl

to my HOSTNAME.mf and created a suited genericstable. After `make all
install restart' and a test I received a MAILER DAEMON from my ISP's
mail hub. I checked that changes were actually committed to
sendmail.cf.

The session transcript (from my workstations's sendmail process talking
to the ISP's mail hub) shows that the private hostname is not
translated.
--
Best wishes,
Michaël

Warren Block

unread,
Sep 17, 2007, 10:25:27 AM9/17/07
to

But the hostname masquerading is done by MASQUERADE_AS. I would suggest
getting that working first, then changing the username.

Giorgos Keramidas

unread,
Sep 17, 2007, 10:09:52 AM9/17/07
to
On 16 Sep 2007 13:01:54 +0200,

michaelg...@yahoo.fr (Michae:l Gru:newald) wrote:
>
> How so you set up E-Mail services for a personal workstation? I
> thought that I could find tips my self, but I actually need some help
> to get pointers.
>
> Here is the plot:
>
> My home workstation is running 6.2-RELEASE and is connected on a
> private LAN. The LAN is connected to the Internet by the means of a
> dedicated hardware provided by the ISP (it is a small router that do
> NAT and DHCP --- I do not use the latter).
>
> I would like to set up the things so that:
> * the machine periodically fetch mail from various mailboxes (I do
> this with cron and fetchmail, but I do not hang on this);
> * the machine handles local mail (from daemons);
> * the machine uses the ``outgoing mail server'' managed by my ISP.

This can be adequately handled by Sendmail, which is already part of the
base system in your FreeBSD 6.2 installation. In fact, this is such a
commonly useful setup (accept local email, forward all others to a mail
relay/gateway), that it is _very_ easy to configure Sendmail to act like
this in recent FreeBSD releases.

The default `freebsd.mc' in the `/etc/mail' directory contains almost
everything you need to set things up. Apart from the default options
enabled there, you will only need *one* extra line, which is already in
the file but commented out:

dnl Dialup users should uncomment and define this appropriately
dnl define(`SMART_HOST', `your.isp.mail.server')

Copy this file to a `*.mc' file with the same name as your host, i.e.:

# cd /etc/mail
# cp freebsd.mc `hostname`.mc

Then edit the file `HOSTNAME.mc' (where `HOSTNAME' is the name of your
host), and replace `your.isp.mail.server' with the name of your ISP's
mail server, taking care to preserve the opening and closing quotes
around it, and remove the `dnl' commenting keyword from the beginning of
the second line.

Then you should have something like this:

dnl Dialup users should uncomment and define this appropriately
define(`SMART_HOST', `mailgate.otenet.gr')

Now you should be ready to install the new Sendmail configuration:

# cd /etc/mail
# make all && make install

To enable Sendmail, you will have to disable `ssmtp', and add the
following to your `/etc/rc.conf' file:

sendmail_enable="NO"
sendmail_outbound_enable="NO"
sendmail_submit_enable="YES"
sendmail_msp_queue_enable="YES"

After these have been added to `rc.conf', you can start Sendmail in
several ways:

1. By using the `Makefile' in `/etc/mail':

# cd /etc/mail
# make start

2. By using the `/etc/rc.d/sendmail' startup script:

# /etc/rc.d/sendmail start

The default behavior of Sendmail is to accept email for any local users,
and deliver the incoming messages to UNIX mailbox style folders in
`/var/mail/USERNAME'.

With the `rc.conf' options described above, Sendmail will only listen to
the `localhost:25' port, so it will serve as a mail transfer agent for
outbound traffic.

You should be able to verify that Sendmail is only listening for
connections to the `localhost:25' address/port by using the sockstat(1)
utility:

# sockstat -l4 -p 25
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
root sendmail 1058 4 tcp4 127.0.0.1:25 *:*
#

> I tried to use ssmtp as suggested by the handbook (24.8 Setting Up to
> Send Only) but I am not smart enough (1) to explain him that `michael'
> is a local user so that mail destinated to him should mot be sent to
> the mail hub, (2) to let fetchmail drop correctly the mail with
> fetchmail.

I don't use `ssmtp' or any of the smaller SMTP servers, because I happen
to like Sendmail a lot. So, I can't really help you with `ssmtp' :-/

If you want help with Sendmail though, I'm always watching this Usenet
group for new posts, and I will try to respond in a semi-timely manner :)

Regards,
Giorgos

Giorgos Keramidas

unread,
Sep 17, 2007, 10:16:21 AM9/17/07
to
On Sun, 16 Sep 2007 08:19:16 -0400, "Ditch Brodie" <dbr...@msn.com> wrote:
>On Sun, 16 Sep 2007 07:01:54 -0400, "Michaël Grünewald"
><michaelg...@yahoo.fr> wrote:
>>
>> I would like to set up the things so that:
>> * the machine periodically fetch mail from various mailboxes (I do
>> this with cron and fetchmail, but I do not hang on this);
>> * the machine handles local mail (from daemons);
>> * the machine uses the ``outgoing mail server'' managed by my ISP.
>
> If you're trying to do what I think you are doing then sendmail,
> postfix, etc... will work. BUT (why does everyone have a big but)
>
> Most ISP's are going to be blocking port 25, which means you will
> have difficulty sending mail out directly from your server to the
> Internet. Local mail is not a problem, but sending it out to the
> world is usually blocked by your ISP because they want to limit
> spammers abillity to setup mailservers that would send out
> millions of e-mail messages.

Michae:l specifically mentioned that he wants to forward all non-local
email to the ``outgoing mail server'' of his ISP, so that shouldn't be a
problem at all :-)

> My ISP is Comcast and I use sendmail. Comcast blocks port 25. But I
> get around this by adding a single line file called
> /etc/mail/mailertable which contains the name of Comcast's smtp
> server. I can use my local server to send mail out but it relays off
> of Comcast's smtp server.

The `mailertable' feature is a very flexible characteristic of Sendmail,
but it's a bit of overkill in this case. If there's only *one* mail
relay you want to use (i.e. the one Comcast exposes to its users), you
can easily do the same thing by removing entirely the current
mailertable and using the `SMART_HOST' configuration option in your
`sendmail.mc' file :)

Having said that, the `mailertable' feature is actually pretty cool if
you are using a laptop at work, and you want to use your own Sendmail
setup for both work-related emails and non-work email. In that case,
depending on the office policy for outgoing email connections, it may be
worth using something like:

local email -> localhost delivery

work email -> internal company mail relay

other email -> some other mail relay

This is what I use at the office, when I connect my laptop at the Patras
offices of my employer, and in this case `mailertable' works remarkably
well. So well, in fact, that I haven't touched my laptop's Sendmail
setup since 2005 or so :-)

- Giorgos

Giorgos Keramidas

unread,
Sep 17, 2007, 10:17:56 AM9/17/07
to
On 16 Sep 2007 14:38:09 +0200, michaelg...@yahoo.fr (Michaël Grünewald) wrote:
> Thank you very much for this precise indication. Sendmail is a complex
> system, and uncharted territory for me. You saved me a lot of time!
>

Hey, a fellow Gnus'er :-)

Now I have yet another reason to help you configure Sendmail right(TM)!

Giorgos Keramidas

unread,
Sep 17, 2007, 10:44:17 AM9/17/07
to
On 17 Sep 2007 01:11:49 +0200, michaelg...@yahoo.fr (Michaël Grünewald) wrote:
>Warren Block <wbl...@wonkity.com> writes:
>>> * the machine uses the ``outgoing mail server'' managed by my ISP.
>>
>> That's the
>>
>> define(`SMART_HOST', `relay.example.net')
>>
>> line in the Handbook entry above. Of course, you'd use the smarthost
>> provided by your ISP instead of relay.example.net.
>
> Thank you very much for your precise answer.
>
> Now the mail system on the workstation ``just works'' and I am pretty
> satisfied with it. However, I would like to add a final touch: I gave
> names to computers on my private (home) network, but these names are
> not meaningful on the public side of the network. It would be clean
> style to prevent sendmail let mail with private hostnames in the
> envelope slip out to the ISP mail-hub. If I could I would tell him
> ``blindly change local addresses to m...@yahoo.fr on outgoing messages''
> but I have no idea how to do this.

This is called ``address masquerading'' in Sendmail.

> I dived into `/usr/share/sendmail/cf/README', but didn't find anything
> suiting my wishes (the closer thing seems the MASQUERADE_AS option,
> but it is actually quite distant).

Yup, that's it.

Perhaps it will help to have a look at the comments I keep locally for
my masquerading and `genericstable' setup?

Lines that begin with `dnl ' below are comments, and you should try to read
these before copying the relevant bits in your `hostname.mc' file.

dnl Snippers from `/etc/mail/kobe.mc' on `kobe.laptop'.

dnl ...

dnl This is a generic configuration file for FreeBSD 6.X and later
dnl systems. It has been customized for a roaming network setup,
dnl directing all outgoing email to `igloo.linux.gr', through SMTP AUTH.
dnl -- Giorgos Keramidas <kera...@ceid.upatras.gr>
dnl
dnl The best documentation for this .mc file is:
dnl /usr/share/sendmail/cf/README or
dnl /usr/src/contrib/sendmail/cf/README

dnl ...

dnl === Outgoing email relay ===
dnl
dnl All outgoing email is sent to igloo.linux.gr through the `relay'
dnl mailer. Exceptions, i.e. for any domains which need special handling,
dnl use `esmtp' or another mailer, through `mailertable'.

define(`SMART_HOST', `igloo.linux.gr')
define(`RELAY_MAILER_ARGS', `TCP $h 587')

dnl ...

dnl === Address masquerading ===
dnl
dnl Making sure that all email that passes through my desktop's Sendmail
dnl installation is masqueraded as coming from `kobe.laptop', even if its
dnl original address is something slightly different (i.e. `ftp.laptop' or
dnl `mail.laptop'), is ok here. It ensures that address rewriting and
dnl translation through `genericstable' will also work for all `*.laptop'
dnl host names.
dnl
dnl To make sure that remote hosts don't get a MAIL FROM address from a
dnl hostname that doesn't resolve, envelope addresses are masqueraded too,
dnl and then get rewritten by `genericstable' to real-world addresses,
dnl i.e. `kera...@ceid.upatras.gr'.

MASQUERADE_AS(`kobe.laptop')
FEATURE(`masquerade_entire_domain')
FEATURE(`masquerade_envelope')

dnl === Address rewriting ===
dnl
dnl Rewriting the envelope-from address of all outgoing messages through a
dnl `genericstable' lookup, ensures that envelope-from addresses seen by
dnl relay hosts are real, i.e. `kera...@ceid.upatras.gr' instead of the
dnl default envelope-from of `kera...@kobe.laptop' that Sendmail would
dnl use. This is required some times, to avoid getting bounces for
dnl messages from ISP mail relays that are misconfigured or are too strict
dnl about what can appear in a MAIL FROM command.

FEATURE(`genericstable', `hash -o /etc/mail/genericstable')
GENERICS_DOMAIN(`kobe.laptop')
FEATURE(`generics_entire_domain')

dnl ...

After you read the comments, try to adapt the non-commented lines, to match
your preference for the setup you want to install. Some tips for setting up
the non-commented lines are below:

* Set SMART_HOST to your ISP's mail relay

I think you have already done this, if you have a setup that's working per
the suggestions of other posters elsethread.

* You probably don't really care about RELAY_MAILER_ARGS

I am using SMTP authentication, to forward all my outgoing email to
`igloo.linux.gr', a mail server for which I am partly responsible.
Normally, it is ok to leave this part out, and let the `relay' mailer use
the default SMTP port (TCP port 25) for outgoing email traffic.

* The MASQUERADE_AS hostname should be tweaked

My laptop's hostname is `kobe.laptop', so you will probably have to tweak
a bit the hostname at the MASQUERADE_AS line, to match the _domain_ name
of your local network. This way, if your hostname is `foo.domain' and
there are also hosts called `bar.domain' and `baz.domain', you can
masquerade all these hostnames to `domain' with:

MASQUERADE_AS(`domain')
MASQUERADE_DOMAIN(`domain')

* The GENERICS_DOMAIN needs similar tweaking

It's probably easier for now to keep the GENERICS_DOMAIN the same as the
value of MASQUERADE_DOMAIN.

* You will have to create a `genericstable'

The `genericstable' feature line at:

FEATURE(`genericstable', `hash -o /etc/mail/genericstable')

makes Sendmail look up outgoing email addresses in a disk file and rewrite
them with the right-hand side of this file. This file is located at
`/etc/mail/genericstable' on my laptop, and it contains entries like:

#
# Outgoing email address rewriting.
#
keramida@localhost kera...@ceid.upatras.gr
kera...@localhost.laptop kera...@ceid.upatras.gr
keramida@kobe kera...@ceid.upatras.gr
kera...@kobe.laptop kera...@ceid.upatras.gr

You will have to create a similar `address map' with your own email
addresses, putting at the right-hand the *real* email address that you
want visible in outgoing messages.

After you create the `/etc/mail/genericstable' file, you can run
makemap(1) on this file with:

# cd /etc/mail
# makemap hash genericstable < genericstable

* Now you should be ready to regenerate the Sendmail config files in
`/etc/mail' and restart it:

# cd /etc/mail
# make all && make install

# make restart

With the `hostname.mc' options described above, and the genericstable map
shown above, Sendmail will start `masquerading' or `rewriting' outgoing email
addresses to the ones you configured at the right-hand side of the
`genericstable' map.

I hope this helps a bit, but if you have problems getting it to work, please
feel free to ask for more details.

- Giorgos

Michaël Grünewald

unread,
Sep 19, 2007, 1:27:26 AM9/19/07
to
I wish to thank here the kind people here trying to help me, and
especially Giorgos Keramidas who recently wrote lengthy detailed
suggestions to me.

I did set the things up, the way Giorgos suggested it, and everything
works now really fine, thank you very much again!
--
Cheers,
Michaël

Michel Talon

unread,
Sep 23, 2007, 9:24:25 AM9/23/07
to
Giorgos Keramidas <kera...@ceid.upatras.gr> wrote:
>
> Having said that, the `mailertable' feature is actually pretty cool if
> you are using a laptop at work, and you want to use your own Sendmail
> setup for both work-related emails and non-work email. In that case,
> depending on the office policy for outgoing email connections, it may be
> worth using something like:
>
> local email -> localhost delivery
>
> work email -> internal company mail relay
>
> other email -> some other mail relay
>
> This is what I use at the office, when I connect my laptop at the Patras
> offices of my employer, and in this case `mailertable' works remarkably
> well. So well, in fact, that I haven't touched my laptop's Sendmail
> setup since 2005 or so :-)

In fact postfix has the same feature. A quick google search gives this
easy example (in french unfortunately)
http://www.hsc.fr/ressources/cours/postfix/postfix027.html
o Utilisation d'une table standard:

transport_maps = hash:/etc/postfix/transport

domaine.com smtp:[interne.domaine.com]
pauvre.domaine.com uucp:pauvre
.domaine.com smtp:[interne.domaine.com]

o Utilisation de regexp:

transport_maps = regexp:/etc/postfix/regtrans

/(.*)\.anciendomaine\.com/ smtp:[$1.nouveaudomaine.com]

--

Michel TALON

Giorgos Keramidas

unread,
Sep 23, 2007, 4:11:12 PM9/23/07
to
On Sun, 23 Sep 2007 13:24:25 +0000 (UTC), ta...@lpthe.jussieu.fr (Michel Talon) wrote:
>Giorgos Keramidas <kera...@ceid.upatras.gr> wrote:
>> Having said that, the `mailertable' feature is actually pretty cool if
>> you are using a laptop at work, and you want to use your own Sendmail
>> setup for both work-related emails and non-work email. In that case,
>> depending on the office policy for outgoing email connections, it may be
>> worth using something like:
>>
>> local email -> localhost delivery
>>
>> work email -> internal company mail relay
>>
>> other email -> some other mail relay
>>
>> This is what I use at the office, when I connect my laptop at the Patras
>> offices of my employer, and in this case `mailertable' works remarkably
>> well. So well, in fact, that I haven't touched my laptop's Sendmail
>> setup since 2005 or so :-)
>
> In fact postfix has the same feature. A quick google search gives this
> easy example (in french unfortunately)
> http://www.hsc.fr/ressources/cours/postfix/postfix027.html

Right, `mailertable' is what Postfix calls a `transport map' :)

The English documentation for `transport maps' is here:

* Configuration file syntax:

http://www.postfix.org/postconf.5.html#transport_maps

* Transport map manual page:

http://www.postfix.org/transport.5.html

0 new messages