Toon posts:

[Sendmail] Envelope To adres rewrite

Pagina: 1
Acties:

Verwijderd

Topicstarter
Hallo,

Ik ben druk bezig met mijn sendmail.mc file om die zo in te stellen dat Sendmail het volgende doet.

Alles email die lokaal wordt verstuurd (dus bv root mailt naar rene en niet naar rene@domain) moet naar een centrale mail server geforward worden.
Dit werk al, er is alleen een maar......

Als ik een mail stuur vanaf root naar rene, dan wordt het emailadres automatisch rene@subdomain.domain.nl. Dit moet rene@domain.nl zijn.
Ik denk dat subdomain.domain.nl uit de namserver wordt gehaald.

Hoe kan ik sendmail zo instellen dat mail naar lokale gebruikers (eigenlijk alle gebruikers/mail) als To adres <gebruiker>@domain.nl krijgen (ipv <gebruiker>@subdomain.domain.nl)?

  • imdos
  • Registratie: Maart 2000
  • Laatst online: 13-05 12:04

imdos

I use FreeNAS and Ubuntu

Van de Trinity os pagina http://www.ecst.csuchico....OS/cHTML/TrinityOS-c.html
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#TrinityOS.mc 8.11.x config - v050402
#
#Give the configuration a version number
VERSIONID(`@(#)trinityos.mc       8.11 (Berkeley) 12/21/01')

#Tell sendmail that the CF file is for the Linux OS
OSTYPE(linux)

#Disable UUCP.  Its old and dead.
FEATURE(nouucp,reject)

#When sending email locally, use procmail to send mail vs. sendmail.  More efficient.
FEATURE(local_procmail)

#Enable the SMTP protocol - other options are the legacy protocols like UUCP and BitNet
MAILER(smtp)

#Use procmail as the local mailer.
MAILER(procmail)

#Rewrite ALL outgoing email to be from acme123.com and not somehost.acme123.com
MASQUERADE_AS(acme123.com)
MASQUERADE_DOMAIN(acme123.com)
FEATURE(masquerade_entire_domain)

#This also does the above trick but also works more in the header.
FEATURE(masquerade_envelope)

#If you email someone locally, say "greg" without the full domain, Sendmail will
#append acme123.com to the address.  "greg@acme123.com"
FEATURE(always_add_domain)

pvoutput. Waarom makkelijk doen, als het ook moeilijk kan! Every solution has a new problem


Verwijderd

Topicstarter
Zo ongeveer had ik het ook maar hij houd het bij user@subdomain.domain.nl :(

Verwijderd

Topicstarter
Mijn sendmail.mc

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
VERSIONID(`$Id: sendmail.mc, v 8.12.3-4 2002-04-15 17:35:56 cowboy Exp $')
OSTYPE(`debian')dnl
DOMAIN(`debian-mta')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`smrsh',`/usr/lib/sm.bin/smrsh')dnl
FEATURE(`access_db')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`allmasquerade')dnl
MASQUERADE_AS(`domain.nl')dnl
EXPOSED_USER(`root')dnl
FEATURE(`masquerade_envelope')
FEATURE(`genericstable', `hash -o /etc/mail/genericstable')
GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')
define(`LOCAL_RELAY', `smtp:host.domain.nl')dnl
define(`MAIL_HUB', `smtp:host.domain.nl')dnl
SMART_HOST(`host.domain.nl')dnl
MAILER(`local')
MAILER(`smtp')

  • Whizzer
  • Registratie: November 2000
  • Laatst online: 15-05 09:55

Whizzer

Flappie!

Zorg in ieder geval dat je virtusertable gebruikt en zet in de virtusertable het volgende:

code:
1
@subdomain.domain.nl                               %l@domain.nl


Als we dan toch indrukwekkend mc files gaan posten, dan ook maar even van mijn sendmail op solaris....

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
include(`../m4/cf.m4')dnl
OSTYPE(solaris2)dnl
define(`STATUS_FILE',`/etc/mail/sendmail.st')dnl
define(`confCW_FILE', `/etc/mail/sendmail.cw')dnl
define(`confCHECK_ALIASES', `TRUE')dnl
define(`confCOPY_ERRORS_TO', `admin@domain.com')dnl
define(`confTO_QUEUEWARN', `1d')dnl
define(`confMIN_FREE_BLOCKS', `100000')dnl
INPUT_MAIL_FILTER(`antivirus', `S=local:/var/antivirus/antivirus.sock,F=')dnl
DAEMON_OPTIONS(`Name=MTA')
DAEMON_OPTIONS(`Name=MTA-v6, Family=inet6, port=smtp')
FEATURE(`access_db', `dbm -T<TMPF> -o /etc/mail/access')dnl
FEATURE(`mailertable', `dbm -o /etc/mail/mailertable')dnl
FEATURE(`domaintable', `dbm -o /etc/mail/domaintable')dnl
FEATURE(`virtusertable', `dbm -o /etc/mail/virtusertable')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(dnsbl,`sbl.spamhaus.org')dnl
FEATURE(dnsbl,`inputs.orbs.org')dnl
FEATURE(dnsbl,`outputs.orbs.org')dnl
FEATURE(dnsbl,`dul.maps.vix.com')dnl
FEATURE(dnsbl,`relays.mail-abuse.org')dnl
FEATURE(dnsbl,`rbl.maps.vix.com')dnl
MAILER(local)dnl
MAILER(smtp)dnl
Cwlocalhost.localdomain


Suc6

Ik ben geweldig.. en bescheiden! En dat siert me...


Verwijderd

Topicstarter
Bedankt Whizzer! _/-\o_

Het lag inderdaad aan de virtusertable... deze optie had ik niet meegenomen maar nu werkt het PERFECT! Eindelijk mail goed na dagen spitten 8)
Pagina: 1