问题
I am using docker container for emails using this exim image
https://registry.hub.docker.com/u/tianon/exim4/
This works fine if i use smtp host as conatiner name in other website and
Now my joomla site is using sendmail and i am not able to figure out how to link sendmail with exim container
I get this error when try to send mail
Could not execute: /usr/sbin/sendmail
thats right because snedmail is not installed within joomla container but how can fix that
回答1:
According to the documentation, Joomla has native support for sending mail to an SMTP server. However, if that won't work (e.g., if you have extensions that ignore Joomla's settings and always try to use a local sendmail
binary), you can install a sendmail alternative that performs the necessary SMTP transaction for you.
A common solution is msmtp, which is often used by mutt users to provide SMTP server for the mutt
mailer. The msmtp
client is command-line compatible, so you can install msmtp
and then:
ln -s /usr/bin/msmtp /usr/sbin/sendmail
Provided that you put the appropriate configuration in place, this should solve your problem.
回答2:
Just about all major MTAs support a "sendmail compatibility mode", and Exim does support that. The fix is simple. As root, do:
cd /usr/sbin
ln -s exim sendmail
Then when your application call /usr/sbin/sendmail and passes a message to it on STDIN, exim will parse the commandline options in a sendmail compatibility mode.
来源:https://stackoverflow.com/questions/28922051/how-to-configure-exim-with-docker-for-sendmail