D
D
display: block2016-06-08 16:57:47
linux
display: block, 2016-06-08 16:57:47

How to make sendmail stub for XAMPP on Linux?

Followed this guide:
www.oldnix.org/blind-sendmail-in-linux
The counter of sent mails in /var/mail/sendmail/num works, headers are written to mail.log , but files with the body of the mail are not created in the new directory.
php.ini :

[mail function]
SMTP= localhost
smtp_port= 25
sendmail_path= /usr/bin/send.sh
mail.log = /var/mail/sendmail/mail.log

The contents of the send.sh bash script :
#!/bin/sh
prefix="/var/mail/sendmail/new"
numPath="/var/mail/sendmail"
if [ ! -f $numPath/num ]; then
echo "0" > $numPath/num
fi
num=`cat $numPath/num`
num=$(($num + 1))
echo $num > $numPath/num
name="$prefix/letter_$num.txt"
while read line
do
echo $line >> $name
done chmod 777 $name
/bin/true

I set the rights to the directory /var/mail/sendmail 777 (in the article there is a small error chmode instead of chmod).
config modx
5954f2f3b3f946629d5ff28cf72cd1c1.png
What could be wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Владимир Куц, 2016-06-08
@qork

Рискну предположить, что он у вас сперва проверяет доступность порта 25 на localhost
Если у вас стоит python (как правило по умолчанию он поставляется в большинстве дистрибутивов), то сделать заглушку проще простого без этих всех плясок с бубном:
А ваш скрипт - это костыль.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question