0

I am trying to receive mail with getmail and reroute it through sendmail to postfix.

I have managed to connect with my external mail server, but it fails when send those mails from getmail to postfix.

I am using OS X with getmail+postfix+dovecot, and here is the config file of getmail:

[retriever]
type = SimplePOP3SSLRetriever
server = cpanel.ideiasfrescas.pt
port: 995
username = teste@X.pt
password = XXXXXX

[destination]
type = MDA_external
path = /usr/sbin/sendmail
arguments = ("-i", "-bm", "teste@remote.X.pt")
unixfrom = true

[options]
delete = false
message_log = ~/.getmail/getmail.log

After running getmail i receive this error for every mail that i have storage at my external mail server:

delivery error (command sendmail 26474 error (127, exec of command sendmail failed (refuse to invoke external commands as root or GID 0 by default)))

It seems that i am accessing my external mail account but is unable to reroute it to postfix (i can see msgid of all mails that i have in that server through getmail log, and before that error i have a mail status like msg 40/43 (6531 bytes) per error)

I assume that maybe there is something wrong with arguments line, since i have sendmail working well. I have search about it but didnt found a good explanation about it, or a way to fix this error for this situation.

marafado88
  • 412
  • 2
  • 9
  • 31

1 Answers1

0

It is impossible to run an external command through root, so i have used a normal user to run getmail, and also i relocate getmail folder to the user that is executing getmail.

marafado88
  • 412
  • 2
  • 9
  • 31