[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
mail500 and email routing
This thread was called "How and where to write a search filter script??????"
,now "mail500 and email routing".
*********
It's been a while. Here are my unsuccessful results of my attempt to have
email routing with mail500. Wesley, I hope your kind offer to help is still
on!!!
When I send mail from user1 to user2 on the mail hub, Mail500 gets invoked
and
it in-turn invokes LDAP to perform a search for the uid and mail attribute.
While the search appears to be running correctly, the mail does not get sent
to
the recipient according to the search result and syslog produces "potential
loop detected" and "loop detected" errors. I beleive such errors are being
printed from main.c as such strings can be found in main.c.
Configuration***************
The mail hub is mail.domain1.co.jp with hostname host 1 and is also the mail
server
for user1. The ldap server is also on this host.
The mail server is mail.subdomain.domain1.co.jp with hostname host2 and is the
mail server
for user2.
USER1****
dn: cn=user1, o=company, c=JP
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetMailLocalRecipient
cn: user1
sn: surname
uid: user1
mail: user1@host1.domain1.co.jp
mailhost: mail.domain1.co.jp
USER2****
dn: cn=user2, o=company, c=JP
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetMailLocalRecipient
cn: user2
sn: surname
uid: user2
mail: user2@host2.subdomain.domain1.co.jp
mailhost: mail.subdomain.domain.co.jp
*******MAIL500 main.c on the mail hub**********
**1. I made the host entry
LDAP *ld;
char *vacationhost = NULL;
char *errorsfrom = NULL;
char *mailfrom = NULL;
char *host = "host1"
char *ldaphost = NULL;
int hostlen = 0;
int debug = 0;
**2. I changed the base array for an LDAP search of uid of the name portion
of the email address.
} Base;
Base base[] =
{ "o=company, c=JP",
0, USER,
"uid=%s", NULL,
NULL
};
char *sendmailargs[] = { MAIL500_SENDMAIL, "-oMrX.500", "-odi", "-oi", "-
f",
NULL, NULL };
**3. I edited the following like this..I am just guessin here!
static char *attrs[] = { "objectClass", "uid", "mail", NULL };
*******Sendmail******************
**1. I added the mailer definition directly into sendmail.cf and changed the
local mailer's path from /bin/mail to P=/usr/local/libexec/mail500.
Is the latter necessary?
Mmail500, P=/usr/local/libexec/mail500, F=DFMSmnXuh,
A=mail500 -f $f -h $h -m $n@$w $u
#Mlocal, P=/bin/mail, F=lsDFMA5:/|@qmnfSn, S=10, R=20/0,
# T=DNS/RFC822/X-Unix,
# A=mail -d $u
Mlocal, P=/usr/local/libexec/mail500, F=lsDFMA5:/|@qmnfSn, S=10, R=20/0,
T=DNS/RFC822/X-Unix,
A=mail -d $u
Mprog, P=/bin/sh, F=lsDFMoqeuP, S=10, R=20/0,
T=X-Unix, D=$z:/,
A=sh -c $u
Msmtp, P=[IPC], F=mDFMuX, S=31/11, R=41/21,
T=DNS/RFC822/SMTP, E=\r\n, L=990,
A=IPC $h
**2. I added the necesary info in Ruleset 0:
#mail500
R$*<@abc.co.jp>$* $#mail500$@abc.co.jp$:<$1>
What I really want is for ldap to check the entire mail address against the
database.
However, to stick closer to the main.c sample in ldap I attempted to do a uid
search
which hands over to sendmail the full main address with hostname.
What am I doing wrong in my configurations? I suppose its wrong all over the
place!
Thankyou for your time and patience, not to mention your help,
Kristina
********
At 09:31 99/11/18 -0500, you wrote:
> > From: Kristina <kristina@fsas.fujitsu.co.jp>
> > To: wesley.craig@umich.edu
>
> > Yes, I was informed long ago that there are two solutions to email
> > routing using sendmail and ldap: either mail500 or
> > ldap-support-on-sendmail. I decided to give the mail500 solution a go
> > first, and I am now stuck on how to write the base array and any other
> > necessary configurations on the main.c file.
>
> Ok, so give an example of what's in your database, how you're calling
> mail500 from sendmail, and what your baseinfo array currently looks
> like. Since mail500 is looking for specific attributes in the code,
> your schema will have to support some of those, at least.
>
> :wes
>