Проблема при отправке писем "PHP Mail Error"

S
На сайте с 28.07.2009
Offline
49
1493

Настраивал сервер, все вроде встало нормально, но при попытке отправить письмо через движек DLE вылезает ошибка PHP Mail Error . Я так понял что не установлен модуль отправки писем PHP.

Нашел что ставится он командой sudo apt-get install sendmail , но при ее выполнении вылезает вот такая шляпа:

Reading package lists... Done

Building dependency tree
Reading state information... Done
E: Unable to locate package sendmail

Что можно сделать ?

P
На сайте с 16.03.2009
Offline
144
#1

apt-cache search sendmail

iqmaker
На сайте с 17.04.2012
Offline
309
#2

sudo apt-get update

потом установи все зависимые:

http://packages.ubuntu.com/precise/sendmail

в крайнем случае установи deb или из исходников, ну или пофикси репозитории если не находит пакет.

S
На сайте с 28.07.2009
Offline
49
#3
poiuty:
apt-cache search sendmail

root@ubuntu:~# apt-cache search sendmail

libmail-sendmail-perl - Send email from a perl script

sudo apt-get update

Делал уже... толку нет. Репозитории может какие в сорс лист добавить ?

W: Failed to fetch http://mn.archive.ubuntu.com/ubuntu/dists/precise/InRelease

W: Failed to fetch http://zw.archive.ubuntu.com/ubuntu/dists/precise/InRelease

W: Failed to fetch http://mn.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg Temporary failure resolving 'mn.archive.ubuntu.com'

W: Failed to fetch http://zw.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg Temporary failure resolving 'zw.archive.ubuntu.com'

W: Some index files failed to download. They have been ignored, or old ones used instead.
iqmaker
На сайте с 17.04.2012
Offline
309
#4

По ссылкам действительно пусто.

У меня на домашней ubuntu (/etc/apt/sources.list) 13.04 такие репозитории:


deb http://ru.archive.ubuntu.com/ubuntu/ raring main restricted
deb-src http://ru.archive.ubuntu.com/ubuntu/ raring main restricted
deb http://ru.archive.ubuntu.com/ubuntu/ raring universe
deb-src http://ru.archive.ubuntu.com/ubuntu/ raring universe
deb http://ru.archive.ubuntu.com/ubuntu/ raring multiverse
deb-src http://ru.archive.ubuntu.com/ubuntu/ raring multiverse

deb http://extras.ubuntu.com/ubuntu raring main
deb-src http://extras.ubuntu.com/ubuntu raring main

deb http://ru.archive.ubuntu.com/ubuntu/ raring-updates main restricted
deb-src http://ru.archive.ubuntu.com/ubuntu/ raring-updates main restricted

deb http://ru.archive.ubuntu.com/ubuntu/ raring-updates universe
deb-src http://ru.archive.ubuntu.com/ubuntu/ raring-updates universe

deb http://ru.archive.ubuntu.com/ubuntu/ raring-updates multiverse
deb-src http://ru.archive.ubuntu.com/ubuntu/ raring-updates multiverse

deb http://ru.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://ru.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu raring-security main restricted
deb-src http://security.ubuntu.com/ubuntu raring-security main restricted
deb http://security.ubuntu.com/ubuntu raring-security universe
deb-src http://security.ubuntu.com/ubuntu raring-security universe
deb http://security.ubuntu.com/ubuntu raring-security multiverse
deb-src http://security.ubuntu.com/ubuntu raring-security multiverse
deb-src http://archive.canonical.com/ubuntu oneiric partner

Редактируется так:

sudoedit /etc/apt/sources.list

Ну или добавляются так:

http://askubuntu.com/questions/78613/how-do-i-enable-the-universe-repository-from-the-command-line

S
На сайте с 28.07.2009
Offline
49
#5

При апдейте вылезает та же бодяга....

root@ubuntu:~# sudo apt-get update
Err http://mn.archive.ubuntu.com precise InRelease

Err http://zw.archive.ubuntu.com precise InRelease

Err http://ru.archive.ubuntu.com raring InRelease

Err http://ru.archive.ubuntu.com raring-updates InRelease

Err http://ru.archive.ubuntu.com raring-backports InRelease

Err http://extras.ubuntu.com raring InRelease

Err http://mn.archive.ubuntu.com precise Release.gpg
Temporary failure resolving 'mn.archive.ubuntu.com'
Err http://zw.archive.ubuntu.com precise Release.gpg
Temporary failure resolving 'zw.archive.ubuntu.com'
Err http://ru.archive.ubuntu.com raring Release.gpg
Temporary failure resolving 'ru.archive.ubuntu.com'
Err http://extras.ubuntu.com raring Release.gpg
Temporary failure resolving 'extras.ubuntu.com'
Err http://ru.archive.ubuntu.com raring-updates Release.gpg
Temporary failure resolving 'ru.archive.ubuntu.com'
Err http://security.ubuntu.com raring-security InRelease

Err http://ru.archive.ubuntu.com raring-backports Release.gpg
Temporary failure resolving 'ru.archive.ubuntu.com'
Err http://security.ubuntu.com raring-security Release.gpg
Temporary failure resolving 'security.ubuntu.com'
Err http://archive.canonical.com oneiric InRelease

Err http://archive.canonical.com oneiric Release.gpg
Temporary failure resolving 'archive.canonical.com'
Reading package lists... Done
W: Failed to fetch http://mn.archive.ubuntu.com/ubuntu/dists/precise/InRelease

W: Failed to fetch http://zw.archive.ubuntu.com/ubuntu/dists/precise/InRelease

W: Failed to fetch http://ru.archive.ubuntu.com/ubuntu/dists/raring/InRelease

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/raring/InRelease

W: Failed to fetch http://ru.archive.ubuntu.com/ubuntu/dists/raring-updates/InRelease

W: Failed to fetch http://ru.archive.ubuntu.com/ubuntu/dists/raring-backports/InRelease

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/InRelease

W: Failed to fetch http://archive.canonical.com/ubuntu/dists/oneiric/InRelease

W: Failed to fetch http://mn.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg Temporary failure resolving 'mn.archive.ubuntu.com'

W: Failed to fetch http://zw.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg Temporary failure resolving 'zw.archive.ubuntu.com'

W: Failed to fetch http://ru.archive.ubuntu.com/ubuntu/dists/raring/Release.gpg Temporary failure resolving 'ru.archive.ubuntu.com'

W: Failed to fetch http://ru.archive.ubuntu.com/ubuntu/dists/raring-updates/Release.gpg Temporary failure resolving 'ru.archive.ubuntu.com'

W: Failed to fetch http://ru.archive.ubuntu.com/ubuntu/dists/raring-backports/Release.gpg Temporary failure resolving 'ru.archive.ubuntu.com'

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/raring/Release.gpg Temporary failure resolving 'extras.ubuntu.com'

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/Release.gpg Temporary failure resolving 'security.ubuntu.com'

W: Failed to fetch http://archive.canonical.com/ubuntu/dists/oneiric/Release.gpg Temporary failure resolving 'archive.canonical.com'

W: Some index files failed to download. They have been ignored, or old ones used instead.

ХЗ уже что делать...

EW
На сайте с 22.04.2013
Offline
19
#6
Serberg:
Temporary failure resolving 'security.ubuntu.com'

Похоже у вас на сервере проблема с настройкой ДНС. Какие ДНС сервера указаны в /etc/resolv.conf? Попробуйте изменить ДНС сервера на следующие и запустить "apt-get update" еще раз.

nameserver 8.8.8.8

nameserver 8.8.4.4

Err http://zw.archive.ubuntu.com precise InRelease
Err http://ru.archive.ubuntu.com raring InRelease

Также у вас какой-то микс из "precise" и "raring" репозиториев в /etc/apt/sources.list

Такое возможно если вы пытались обновить систему с "precise" -> "raring". Попробуйте закомментировать строки "precise", а затем запустить:

sudo apt-get update && sudo apt-get upgrade

http://www.webhostingzone.org (http://www.webhostingzone.org) - хостинг в США, VPS сервера, Регистрация доменов, SSL сертификаты Посмотреть отзывы о WebHostingZone. (http://www.serchen.com/company/webhostingzone/)
iqmaker
На сайте с 17.04.2012
Offline
309
#7

Вот похоже на решение вашей проблемы:

M
На сайте с 24.10.2011
Offline
173
#8

таким образом можно напороться на нерабочую систему примерно через 5 минут. не проще обратиться к профессионалу?

S
На сайте с 28.07.2009
Offline
49
#9

Спасибо всем за помощь. Дело оказалось в том что небыли прописаны DNS на сервере в /etc/resolv.conf . Прописал:

nameserver 8.8.8.8

nameserver 8.8.4.4

И все зашевелилось.

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий