S
S
stasersmailov2021-06-14 21:24:09
linux
stasersmailov, 2021-06-14 21:24:09

Why is Debian mail not being sent?

I want to send an email from my server to my gmail. Installed postfix.
postfix check - I write no errors
- echo "body" | mailx -s "subject" -r "test" [email protected]
does not give any errors, but the message does not even go to spam
in /var/log/mail.log nothing is added
I also put Apache on the server and tried this code send

<?php
$to      = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
    'Reply-To: [email protected]' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>


But nothing ever came

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
SOTVM, 2021-06-15
@sotvm

run set + xbefore the command = there is more exhaust,
you can see what the problem is

A
Alexey Dmitriev, 2021-06-15
@SignFinder

stasersmailov can you clarify what you want? Have your own mail server in your domain and send mail through it, or use a public server like mail.ru and send mail through it.

F
Fenrir89, 2021-06-16
@Fenrir89

delivery error

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question