I am running Ubuntu 16.04 on Google Cloud Compute. After completing this tutorial on sending Email with SendGrid, I am getting an error when testing sendgrid in command line:
- server3 postfix/trivial-rewrite[15407]: warning:
hash:/etc/postfix/relayhost_map lookup error for
"user@server3.<mydomain>.com.au"
server3 postfix/trivial-rewrite[15407]: warning:
sender_dependent_relayhost_maps lookup failure
server3 postfix/error[17434]: B62708488F: to=<[email protected]>,
relay=none, delay=0.24, delays=0.2/0.02/0/0.02, dsn=4.3.0,
status=deferred (address resolver failure)
Now if I look at this and try to apply some logic to it, I believe that the problem is there is no relayhost_map
for my user@server3.<mydomain>.com.au
?
Is the relay map missing for the server, or for the user? I seem to get the same error no matter which user I am sending a test email with (I have tried 3 of them that are active).
I am not sure what to do to fix this?
I have figured out what the problem is. This is an important change that needs to be made in
/etc/postfix/main.cf
. You must ensure that if it exists, the following line is commented out or deleted...If that line is not commented out, obviously postfix goes looking for a
relayhost_map
(which does not exist if the tutorials are followed).Hope this helps someone else... the google cloud tutorial on this is incomplete, as is the sendgrid one.