email from moodle
ubuntu 10.04.1 moodle 2.2.2+ postfix
Having trouble sending mail from moodle server. We used to have a zimbra server on site but have now switched to gmail and after reading the guidance at Email setup gmail - MoodleDocs (and failing to make that work) I decided to go back to letting moodle send its own mail and re-installed postfix. It seems that it's still trying to relay via our old zimbra server but I can't find this in any settings to switch it off. Where next?
extract from mail log:
Oct 4 09:49:10 moodle postfix/pickup: F2DE51401CE: uid=33 from=
Oct 4 09:49:10 moodle postfix/cleanup: F2DE51401CE: message-id=
Oct 4 09:49:11 moodle postfix/qmgr: F2DE51401CE: from=, size=791, nrcpt=1 (queue active)
Oct 4 09:49:11 moodle postfix/smtp: F2DE51401CE: to=, relay=zimbra.wolsingham.internal[10.0.0.6]:25, delay=0.07, delays=0.01/0.01/0.04/0.01, dsn=5.1.7, status=bounced (host zimbra.wolsingham.internal[10.0.0.6] said: 501 5.1.7 Bad sender address syntax (in reply to MAIL FROM command))
Oct 4 09:49:11 moodle postfix/cleanup: 100F81401D9: message-id=<20121004084911.100F81401D9@moodle.wolsinghamschool .net>
Oct 4 09:49:11 moodle postfix/bounce: F2DE51401CE: sender non-delivery notification: 100F81401D9
Oct 4 09:49:11 moodle postfix/qmgr: 100F81401D9: from=<>, size=2944, nrcpt=1 (queue active)
Oct 4 09:49:11 moodle postfix/qmgr: F2DE51401CE: removed
Oct 4 09:49:11 moodle postfix/error: 100F81401D9: to=, relay=none, delay=0.01, delays=0/0/0/0, dsn=5.1.3, status=bounced (bad address syntax)
Oct 4 09:49:11 moodle postfix/qmgr: 100F81401D9: removed
You need to change the 'relayhost' setting in /etc/postfix/main.cf. Either comment it out (in which case postfix will send mail directly) or change it to a working relay that you have access to (your LEA SMTP server or whatever).
Thanks very much Geoff and sorry for slow response to your very fast response (I had an old email address registered with this account)
I had another look in postfix config and definitely nothing there but helpful to know I was looking in the right file!
I think we may have a redirect set up somewhere on our network. Is there a way to find out from my server?
from your log file your postfix installation is currently trying to relay via zimbra.wolsingham.internal (IP 10.0.0.6). That server is bouncing the mails because email@example.com doesn't exist as far as it's concerned.
thanks, that makes sense. Pardon my ignorance of Postfix but could this happen if there was nothing in the postfix config to make it happen?
Well that depends, perhaps the better starting point is to ask what you actually want to happen?