IBM

sendmail - collect all account

This may be generic and not just IBM AIX specific, but I'm implementing on AIX 7.

Been reading up today, and setup sendmail on my power5 system and all went well, can collect, send etc no problem but..

I wanted to direct any email sent to my domain that is incorrect to be passed to single mailbox.

So, the answer my friends, is virtusertabl & virtusertable.db which I have set up thus:

Code: Select all

# virtusertable
# makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable
#
# <email address>   <local account>
@mydomain.com   [email protected]


I have created the has db using

Code: Select all

makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable
but, I am missing something.

sendmail has been restarted, also sendmail -bi (which I think reads the alias files, not sure.

sendmail.mc

Code: Select all

# /etc/mail/sendmail.mc
FEATURE('virtusertable', 'hash -o /etc/mail/virtusertable.db')dnl


Now, are you meant to to create the sendmail.cf from the sendmail.mc like

Code: Select all

m4 sendmail.cf < sendmail.mc


Been a long time since I messed with sendmail and I don't ever recall configuring it that much.

I suppose, the question is, how does sendmail.cf use sendmail.mc ?
-----------------------------------------------------------------------
Hey Ho! Pip & Dandy!
:Fuel: :Octane2: :O2: :Indigo: :Indy:
-----------------------------------------------------------------------
oh and does this conflict with aliases?
-----------------------------------------------------------------------
Hey Ho! Pip & Dandy!
:Fuel: :Octane2: :O2: :Indigo: :Indy:
-----------------------------------------------------------------------
uunix, really :( This is a family-oriented group. If you want to play with sendmail in the privacy of your own loft, there's nothing we can do about it. But please, in public ? Think of the children :(
the bourgeousie is ultimately a repressive institution, and I hate it ...
Yes, you need to preprocess the file into sendmail.cf. I usually just handwrite my sendmail rules, but I'm certifiable.
smit happens.

:Fuel: bigred , 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy , 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze , 175MHz R10000, Solid IMPACT
probably posted from Image bruce , Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...
uunix wrote: Now, are you meant to to create the sendmail.cf from the sendmail.mc like

Code: Select all

m4 sendmail.cf < sendmail.mc

I'm sure you mean

Code: Select all

m4 sendmail.mc > sendmail.cf
here (after making a backup of the previous sendmail.cf first).
:Indigo: R4000 :Indigo: R4000 :Indigo: R4000 :Indigo2: R4400 :Indigo2IMP: R4400 :Indigo2: R8000 :Indigo2IMP: R10000 :Indy: R4000PC :Indy: R4000SC :Indy: R4600 :Indy: R5000SC :O2: R5000 :O2: RM7000 :Octane: 2xR10000 :Octane: R12000 :O200: 2xR12000 :O200: - :O200: 2x2xR10000 :Fuel: R16000 :O3x0: 4xR16000 :A350:
among more than 150 machines : Apollo, Data General, Digital, HP, IBM, MIPS before SGI , Motorola, NeXT, SGI, Solbourne, Sun...
Yes I know I'm mad and there are other MTA's available, but as Magnus Magnusson used to say 'I've started so I'll finish'...

Can't do anything today since I can't connect, looks like my attempts at creating a NIS master last night failed miserably, or rather, I should have a new guide-line of 'Don't go to bed until you have finished what you are doing'.

Anyway, going back to the m4 sendmail.mc > sendmail.cf,
IF I have just a few lines in my mc files, will it integrate into the complete cf file or will it over-write the cf and leave the cf in the same state as the as the original mc file (a few lines)?
-----------------------------------------------------------------------
Hey Ho! Pip & Dandy!
:Fuel: :Octane2: :O2: :Indigo: :Indy:
-----------------------------------------------------------------------
If I ever touched sendmail on AIX, it was back around 1992 - and nothing remains. Caveat emptor.

On my FreeBSD-based mail server, there's a Makefile in /etc/mail -- when you tweak the sendmail.mc file you should be able to run the command "make cf" and it will invoke m4 with whatever it needs to pull in the supporting files.

What a given .mc file produces depends on what's in the .mc file, in terms of OSTYPE, FEATUREs, etc. If you invoke the right things, you'll get a long and functional .cf file. Try to find where AIX has put all the mc files that shipped with sendmail - FreeBSD puts them under /usr/share/sendmail/cf. Look for a README there. Some sample .mc files are in /usr/share/sendmail/cf/cf.

For virtusertable to work, you may need the domain being rewritten to be listed in the text file /etc/mail/local-host-names. Check the file /etc/mail/virtusertable.sample if you have it. Better, grep for "virtuser" in the IBM-supplied sendmail.mc if you have it.
Then? :IRIS3130: ... Now? :O3x02L: :A3504L: - :A3502L: :1600SW: +MLA :Fuel: :Octane2: :Octane: :Indigo2IMP: :Indy: ... Other: DEC :BA213: :BA123: Sun , DG AViiON , NeXT :Cube:
uunix wrote: Anyway, going back to the m4 sendmail.mc > sendmail.cf,
IF I have just a few lines in my mc files, will it integrate into the complete cf file or will it over-write the cf and leave the cf in the same state as the as the original mc file (a few lines)?

Il will overwrite the file, of course - that's what shell redirections do.

The usual Idiom will however be something like

Code: Select all

m4 -D_CF_DIR=/wherever/ /wherever/m4/cf.m4 sendmail.mc > sendmail.cf
, as the .mc macros need to be defined somewhere. Replace /wherever with the directory name of the sendmail configuration machinery.
:Indigo: R4000 :Indigo: R4000 :Indigo: R4000 :Indigo2: R4400 :Indigo2IMP: R4400 :Indigo2: R8000 :Indigo2IMP: R10000 :Indy: R4000PC :Indy: R4000SC :Indy: R4600 :Indy: R5000SC :O2: R5000 :O2: RM7000 :Octane: 2xR10000 :Octane: R12000 :O200: 2xR12000 :O200: - :O200: 2x2xR10000 :Fuel: R16000 :O3x0: 4xR16000 :A350:
among more than 150 machines : Apollo, Data General, Digital, HP, IBM, MIPS before SGI , Motorola, NeXT, SGI, Solbourne, Sun...
OK so I have my IBM back up and running, I had in fact messed up NIS, but not sure how. I found an interesting titbit that may be useful for AIX users setting up NIS that reverts back to local if your domain cannot be found or you just fsck it up.
add the following to /etc/environment
YPBIND_MAXWAIT=300

When nis is not availeble after 5 minutes the system will start and will use local access.


And another note, although I mentioned that the KVM works with USB on my 285 but the focus MUST be on the IBM at power on, selecting a different prom/boot option doesn't work and you have connect a USB keyboard directly if you need to boot single user (or use any of the other options).

Now I'm back up and running I will be re-addressing the evils of Sendmail whilst I attempt to acknowledge and admit the fact I'm actually watching Dr Who because of his good looking assistant and not the actual show!
-----------------------------------------------------------------------
Hey Ho! Pip & Dandy!
:Fuel: :Octane2: :O2: :Indigo: :Indy:
-----------------------------------------------------------------------
Vladio wrote: I'm actually watching Dr Who because of his good looking assistant...
Dude, the Doctor has companions not assistants. It's hamei who has an "assistant"... :lol:
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:
vishnu wrote:
Vladio wrote: I'm actually watching Dr Who because of his good looking assistant...
Dude, the Doctor has companions not assistants. It's hamei who has an "assistant"... :lol:

Not according to John Pertwee .. maybe hamei is Dr Who..........
-----------------------------------------------------------------------
Hey Ho! Pip & Dandy!
:Fuel: :Octane2: :O2: :Indigo: :Indy:
-----------------------------------------------------------------------
uunix wrote: [ot according to John Pertwee ..

Ah, Jon Pertwee! There, fixed that for ya... ;) I for one have vivid recollections of his assistant Jo Grant as portrayed by the ever lovely Katy Manning.
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2: