Google email relay – Multiple destination domains per transaction is unsupported

Those experiencing this problem when trying to send batches of emails through the google’s multiple MX records ( , , …) , here are some workarounds.

In this case scenario we will assume we are using CentOS and sendmail as our method.

  1. Segregate different domain emails to be sent through a separate  sendmail session (this is usually done in your code)
  2. Relay everything through the
  3. Configure sendmail to delivery to each email on one connection.

On you add these following line

define(`SMTP_MAILER_MAXRCPTS', `1')dnl
define(`RELAY_MAILER_MAXRCPTS', `1')dnl

The above lines MUST be added before


After that save your .mc and m4 it to your .cf

m4 >

Restart sendmail and test

service sendmail restart

If, however, you are those that directly edit the .cf instead of the .mc then you’ll have to do the following

In you .cf find the following text (“Msmtp,” , “Mesmtp,” , “Mdsmtp, “, “Mrelay,”)
After that find the following line(s)


And change it to look like this

r=1, T=DNS/RFC822/SMTP,


This problem isn’t really an error as it requques your emails when this happens.
Though the third solution will work is not ideal to use as it requires sendmail to open/close connections for each email.
One last thing to look for is the cached-connections for sendmail