I am a new subscriber to this mail list and am in need of some help
configuring Postfix/Sendmail to work with the Apache James email server.
Don't get me wrong on this, Postfix is probably a fine MTA, but I have
some complex mailets designed which run under Apache James. ;-) Anywise,
in the past, I have usually turned off Postfix, on my servers, and just
used the older Sendmail to handle the mail interface for some other
applications that are also running on my servers. (Bugzilla and Bacula
in particular) To accomplish this, the people at Apache James supplied a
set of instructions (now found at
http://wiki.apache.org/james/JamesAndSendmail ) to configure Sendmail
just to relay email it picks up, to James, and not conflict with James
in using the ports)
My distro (openSuSE 11.4) appears to be dropping the older Sendmail and
moving towards Postfix instead. I know that Postfix supplies a somewhat
compatible SendMail front end, so as to remain compatible with those
applications that use Sendmail. What I need to know is how to configure
Postfix/SendMail to work with and be compatible with Apache James. In
other words, I would like to be able to accomplish the same effective
configuration as was done and explained on the above mentioned webpage.
Would some kind Postfix guru be willing to help me with this? Sure would
appreciate it, and I will help/work with the James webmaster to update
their wiki so the Postfix mail list won't be bothered with others asking
this same question. Many thanks in advance!
Marc Chamberlin
If you can describe what Sendmail features Apache James requires,
then an experienced Postix admin here can tell you if you need to
change any Apache/Postfix settings at all.
For example, if it connected to Sendmail with SMTP, then all settings
you need are in http://www.postfix.org/BASIC_CONFIGURATION_README.html.
Wietse
1. Stop Postfix/Sendmail from running as an SMTP daemon
2. Set up Postfix's frontend Sendmail to relay email to the James
server on localhost.
3. Stop Postfix's Sendmail complaining about mail apparently looping
back, if necessary.
4. James requires SMTP AUTH, so mail relayed to it from Sendmail will
need to follow the log in protocols.
I won't need Postfix to receive and process email for local users
either, just need the Sendmail API for other applications running on the
servers.
Marc Chamberlin
> Thanks Wietse for replying! From your reply, I think you are
> interpreting my question as asking how Apache James can use
> Postfix/Sendmail to process email for it. Actually, what I need is the
> other way around, how to configure Postfix/Sendmail to relay email to
> the Apache James email server without causing a conflict between the two
> services. If you follow the link to the webpage that I provided in my
> posting, it will explain what is needed to run the old Sendmail app with
> Apache James. Basically there are 4 things which need to be done -
>
> 1. Stop Postfix/Sendmail from running as an SMTP daemon
> 2. Set up Postfix's frontend Sendmail to relay email to the James
> server on localhost.
> 3. Stop Postfix's Sendmail complaining about mail apparently looping
> back, if necessary.
> 4. James requires SMTP AUTH, so mail relayed to it from Sendmail will
> need to follow the log in protocols.
>
> I won't need Postfix to receive and process email for local users
> either, just need the Sendmail API for other applications running on the
> servers.
1. Comment out the smtpd(8) service in master.cf.
2. Configure the domains in question as relay_domains; fill in
relay_recipient_maps if they are known, or unset it if they are not.
NOTE that unsetting relay_recipient_maps inherently trusts all mail
submitted via sendmail(1); it's up to you if you want to risk this.
3. Show that this happens at all.
4. Set up client SASL in the smtp(8) service as documented in
http://www.postfix.org/SASL_README.html#client_sasl
Reload postfix.
--
J.
I forgot to mention that if you want to allow this for ALL mail, this
won't work; you will have to allow all mail to relay through postfix,
and set up relayhost to point to your James instance.
The risk noted above will increase accordingly.
Indeed. You wrote that "Postfix supplies a somewhat compatible
SendMail SendMail front end". This front end RECEIVES non-network
email and inserts it into the Postfix queue for processing.
> Actually, what I need is the other way around, how to configure
> Postfix/Sendmail to relay email to the Apache James email server
> without causing a conflict between the two services.
You mean, both running on the same machine. What is the purpose of
having two SMTP programs on the same machine?
> If you follow the link to the webpage that I provided in my
> posting, it will explain what is needed to run the old Sendmail app with
> Apache James. Basically there are 4 things which need to be done -
>
> 1. Stop Postfix/Sendmail from running as an SMTP daemon
Execute:
# postfix stop
> 2. Set up Postfix's frontend Sendmail to relay email to the James
> server on localhost.
Documented in:
http://www.postfix.org/STANDARD_CONFIGURATION_README.html#firewall
> 3. Stop Postfix's Sendmail complaining about mail apparently looping
> back, if necessary.
The most robust way is to configure a second IP address, with its
own unique hostname. Specify:
/etc/postfix/main.cf:
inet_interfaces = the second IP address
myhostname = the second hostname
Execute:
# postfix stop
# postfix start
If you can't have more than one IP address, then the solution is to
configure Apache James to listen on a port other than 25, and to
configure Postfix to send mail to that port instead of 25.
> 4. James requires SMTP AUTH, so mail relayed to it from Sendmail will
> need to follow the log in protocols.
Documented in:
http://www.postfix.org/SASL_README.html#client_sasl
> I won't need Postfix to receive and process email for local users
> either, just need the Sendmail API for other applications running on the
> servers.
Please don't use standard terminology in non-standard ways. That
results only in massive confusion.
An API is an application programming interface: a library call or
a kernel call. The only Sendmail API in general use is the mail
filter (Milter) API. This Sendmail API is not designed to deliver
mail from one system to another.
Wietse
He wrote that Postfix should relay mail to Apache James. In the
context of SMTP mail, relaying has a specific meaning.
If all that is needed is to forward /usr/sbin/sendmail submissions
to Apache James, then perhaps the original poster can confirm this,
and we can provide a really simple configuration for the Apache
James documentation.
Wietse
I do not need the full functionality of Postfix and Apache James running
on the same machine, just James. But like I have said, I have other
applications, such as Bugzilla, Bacula, and some Tomcat webapps running
on the same machine as James, and these programs are designed to use
sendmail to send out email notifications to users and to the
admin/operator. So yes, I simply need /usr/sbin/sendmail to forward
these submissions to Apache James and not cause a conflict on using port
25 (and port 465 for ssh connections) The Apache James server must
listen on these ports as we have real users using it, both on-site and
off-site, so I don't think it should be configured to listen on a
different port.
I am assuming that /usr/sbin/sendmail is now part of Postfix and is to
be configured via the Postfix configuration files. The older sendmail
application use to have it's own configuration file, to which the notes
on the Apache James website applied.
I tried to summarize the notes Apache James supplied on how to use the
older sendmail application to accomplish this task, and I was attempting
to use their terminology to try an explain. So again, if I am misusing
terminology, please forgive me for causing confusion...
Marc Chamberlin
> I do not need the full functionality of Postfix and Apache James running
> on the same machine, just James. But like I have said, I have other
> applications, such as Bugzilla, Bacula, and some Tomcat webapps running
> on the same machine as James, and these programs are designed to use
> sendmail to send out email notifications to users and to the
> admin/operator. So yes, I simply need /usr/sbin/sendmail to forward
> these submissions to Apache James and not cause a conflict on using port
> 25 (and port 465 for ssh connections) The Apache James server must
> listen on these ports as we have real users using it, both on-site and
> off-site, so I don't think it should be configured to listen on a
> different port.
Postfix is too complex an MTA for your needs. Find a simple sendmail(1)
to SMTP agent, that does little else. It should ideally have a simple
queue for times when the SMTP server is down, but otherwise forward
everything to the local port 25 service.
Look for "mini_sendmail" and alternatives.
--
Viktor.
Marc Chamberlin:
> So yes, I simply need /usr/sbin/sendmail to forward these submissions
> to Apache James and not cause a conflict on using port 25 [etc]
In that case, you need to check your claim that SASL authentication
is required. If Apache James can be configured not to require SASL
authentication for submission from the machine's own IP address,
then you don't need Postfix or Sendmail, all you need is a
mini_sendmail program. mini_sendmail programs install as
/usr/sbin/sendmail and submit mail via a local SMTP port.
The main bug with using mini-sendmail programs is that they usually
can't handle mail while the system boots up. Some system start-up
procedures may want to send email. Examples of this text editors
that recover your editor session after system crash.
Wietse