Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email Forwarding to Pipe not working due Permission denied #63

Open
TuxADN opened this issue Sep 1, 2022 · 1 comment
Open

Email Forwarding to Pipe not working due Permission denied #63

TuxADN opened this issue Sep 1, 2022 · 1 comment

Comments

@TuxADN
Copy link

TuxADN commented Sep 1, 2022

Hello friends,
I need some help getting email piping to work please.
I've configured an email address to forward incoming emails to HelpDeskz pipe.php
The email is received and processed by Postfix, gets a Permission denied error, and it finally gets to the queue for later retry.

Email Log:

Aug 25 21:07:52 mail postfix/qmgr[754997]: 6D6DB401362: from=<external.user@gmail.com>, size=5458, nrcpt=1 (queue active)
Aug 25 21:07:52 mail postfix/pipe[791543]: 6D6DB401362: to=<my_email@domain.com>, relay=my_emailpipe, delay=1044, delays=1044/0/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /home/domain.com/public_html/pipe.php: Permission denied )

Pipe program is chmod 755 executable:

# ls -la /home/domain.com/public_html/pipe.php
-rwxr-xr-x 1 domai1234 domai1234 468 Mar  9  2021 /home/domain.com/public_html/pipe.php

This is a CyberPanel instance running on Ubuntu 20.04
Your help is appreciated.

@TuxADN
Copy link
Author

TuxADN commented Sep 5, 2022

Solved it.
Acatually what needs to be done is to modify postfix master.cf

Ensure what user and group the script is owned by:

ls -la /home/domain.name/path_to_script_folder

Modify master.cf

nano /etc/postfix/master.cf

Modify the pipe line with the command to execute:

change:
user=adminuser
to:
user=scriptuser:scriptgroup

Restart postfix

service postfix restart

Hope it helps anyone else, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant