sendmail - collect all account

IBM workstations/servers/mainframes and operating systems (AIX, OS/2, etc.)
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
uunix
Posts: 875
Joined: Sun Mar 27, 2011 12:48 pm
Location: Stourbridge / England / UK

sendmail - collect all account

Unread postby uunix » Tue Oct 13, 2015 12:18 pm

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   catchall@mydomain.com


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!
MyDungeon() << :Fuel: :Octane2: :Octane2: :Octane2: :Octane: :Indy: MyLoft() << :540: :Octane: MyWork() << :Indy: :Indy: :O2: :O2: :O2: :Indigo: :Indigo:

User avatar
uunix
Posts: 875
Joined: Sun Mar 27, 2011 12:48 pm
Location: Stourbridge / England / UK

Re: sendmail - collect all account

Unread postby uunix » Tue Oct 13, 2015 12:19 pm

oh and does this conflict with aliases?
-----------------------------------------------------------------------
Hey Ho! Pip & Dandy!
MyDungeon() << :Fuel: :Octane2: :Octane2: :Octane2: :Octane: :Indy: MyLoft() << :540: :Octane: MyWork() << :Indy: :Indy: :O2: :O2: :O2: :Indigo: :Indigo:

hamei
Posts: 10423
Joined: Tue Feb 24, 2004 4:10 pm
Location: over the rainbow

Re: sendmail - collect all account

Unread postby hamei » Tue Oct 13, 2015 6:24 pm

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 :(

User avatar
ClassicHasClass
Donor
Donor
Posts: 1511
Joined: Wed Jul 25, 2012 7:12 pm
Location: Sunny So Cal
Contact:

Re: sendmail - collect all account

Unread postby ClassicHasClass » Tue Oct 13, 2015 9:42 pm

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 * HP C8000 * BeBox * Solbourne S3000 * Commodore 128 * many more...

User avatar
miod
Posts: 389
Joined: Fri Oct 09, 2009 2:44 am
Location: Orgerus (France)
Contact:

Re: sendmail - collect all account

Unread postby miod » Tue Oct 13, 2015 11:24 pm

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...

User avatar
uunix
Posts: 875
Joined: Sun Mar 27, 2011 12:48 pm
Location: Stourbridge / England / UK

Re: sendmail - collect all account

Unread postby uunix » Wed Oct 14, 2015 1:44 am

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!
MyDungeon() << :Fuel: :Octane2: :Octane2: :Octane2: :Octane: :Indy: MyLoft() << :540: :Octane: MyWork() << :Indy: :Indy: :O2: :O2: :O2: :Indigo: :Indigo:

User avatar
smj
Posts: 1500
Joined: Mon Nov 12, 2007 7:54 pm
Location: Berkeley, CA, USA, NA, Earth, Sol
Contact:

Re: sendmail - collect all account

Unread postby smj » Wed Oct 14, 2015 3:35 am

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.
Last edited by smj on Wed Oct 14, 2015 3:40 am, edited 1 time in total.
Then? :IRIS3130: ... Now? :O3x02L: :A3504L:- :A3502L: :1600SW:+MLA :Fuel: :Octane2: :Octane: :Indigo2IMP: ... Other: DEC :BA213: :BA123: Sun, DG AViiON, NeXT :Cube:

User avatar
miod
Posts: 389
Joined: Fri Oct 09, 2009 2:44 am
Location: Orgerus (France)
Contact:

Re: sendmail - collect all account

Unread postby miod » Wed Oct 14, 2015 3:38 am

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...

User avatar
uunix
Posts: 875
Joined: Sun Mar 27, 2011 12:48 pm
Location: Stourbridge / England / UK

Re: sendmail - collect all account

Unread postby uunix » Sat Oct 17, 2015 12:57 pm

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!
MyDungeon() << :Fuel: :Octane2: :Octane2: :Octane2: :Octane: :Indy: MyLoft() << :540: :Octane: MyWork() << :Indy: :Indy: :O2: :O2: :O2: :Indigo: :Indigo:

User avatar
vishnu
Donor
Donor
Posts: 2602
Joined: Sun Mar 18, 2007 3:25 pm
Location: Minneapolis, Minnesota USA

Re: sendmail - collect all account

Unread postby vishnu » Fri Oct 23, 2015 4:36 pm

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:

User avatar
uunix
Posts: 875
Joined: Sun Mar 27, 2011 12:48 pm
Location: Stourbridge / England / UK

Re: sendmail - collect all account

Unread postby uunix » Fri Oct 23, 2015 5:21 pm

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!
MyDungeon() << :Fuel: :Octane2: :Octane2: :Octane2: :Octane: :Indy: MyLoft() << :540: :Octane: MyWork() << :Indy: :Indy: :O2: :O2: :O2: :Indigo: :Indigo:

User avatar
vishnu
Donor
Donor
Posts: 2602
Joined: Sun Mar 18, 2007 3:25 pm
Location: Minneapolis, Minnesota USA

Re: sendmail - collect all account

Unread postby vishnu » Sun Oct 25, 2015 10:40 am

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.
Attachments
Jo_Grant.jpg
Jo_Grant.jpg (27.05 KiB) Viewed 406 times
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:


Return to “IBM”

Who is online

Users browsing this forum: No registered users and 1 guest