I'm attempting to set up sendmail to use the mailgun smtp relay for some email invoices our company sends out. However, these are originating from a handful of different domains and when I try to set up authinfo like this:

AuthInfo:smtp.mailgun.org "U:user@website1.com" "P:pAsSWoRd" "M:PLAIN"
AuthInfo:smtp.mailgun.org "U:user@website2.org" "P:pAsSWoRd" "M:PLAIN"

and try to run /etc/mail/make, it fails with the error:

makemap: authinfo.db: line 3: key authinfo:smtp.mailgun.org: duplicate key

Is there a way to set up authinfo so that I send from both domains without it showing up as user=website2.org@website1.com, or do I need to configure something differently to allow me to send like this?

  • How do you submit the messages? a) SMTP over TCP/IP b) direct dendmail execution (with configurable sendmail command line) c) .... – AnFi Nov 15 '18 at 21:45
  • The messages are sent from a database server to this server, which we are trying to point at mailgun for verification of addresses and delivery. I believe (I didn't set this up) they are sent via smtp to this sever, which will submit them via sendmail. – masu283943 Nov 15 '18 at 21:53
  • Can you set sendmail path used by the database server? [Can you use your own wrapper program/script?] – AnFi Nov 15 '18 at 22:41
  • That's honestly what I'm planning to suggest to the business. There's no real need to try and set up a second relay if we can just point the database server to mailgun instead. – masu283943 Nov 16 '18 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.