How can i connect a local email server to a web browser interface and retrieve emails?
Any tutorials on this are welcome.
How can i connect a local email server to a web browser interface and retrieve emails?
Any tutorials on this are welcome.
I would suggest you look at one of the available webmail packages, such as SquirrelMail, they can do what you are describing.
thanks for your answers,but can't i just connect to the mailserver.I have tried and still am trying just to connect to it from php.All iam getting is:
Warning: imap_open() [function.imap-open]: Couldn't open stream {localhost:143} in /home/bal/tec/conn.php on line 8
FAILED TO CONNECT TO IMAP HOST!
atleast i should be able to see the good connection result before i even go in to horde or orundcube.
here is my test file:
<?php
$host="{localhost:143}";
$user="aretab@ba.localhost";
$pass="get4";
if ($mbox=imap_open( $host, $user, $pass ))
{
$imap_obj = imap_check($mbox);
echo "<h1>CONNECTED TO IMAP HOST</h1><h2>$host (". $imap_obj->Nmsgs .")<h2>";
} else
{
echo "<h1>FAILED TO CONNECT TO IMAP HOST!</h1>\n";
die;
}
echo "<h3>IMAP LIST OF FOLDERS</h3>";
$folders = imap_list($mbox, $host, "*");
echo "<ul>";
foreach ($folders as $folder) {
echo '<li><a href="mail.php?folder=' . $folder . '&func=view">' . imap_utf7_decode($folder) . '</a></li>';
}
echo "</ul>";
imap_close($mbox);
?>
If i can be able to send mail to new users in the database on the terminal,why am i failing to atleast connect via php??
First, are you running dovecot-imapd on this host to handle IMAP connections?
If so, try running the command "telnet localhost 143". Can you connect to dovecot that way? If not, edit /etc/dovecot/dovecot.conf and remove the hash mark from this line:
then restart dovecot with "sudo service dovecot restart" and try the telnet test again.Code:listen = *, ::
If you only intend to connect to the IMAP server on localhost (which is common if the webmail client is on the same machine as the mail server), then you can use
for greater security.Code:listen = 127.0.0.1
Last edited by SeijiSensei; May 28th, 2014 at 01:24 PM.
If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.
Blog · Linode System Administration Guides · Android Apps for Ubuntu Users
hello SeijiSensei this is the result:
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
a login aretab getin1234
a NO [AUTHENTICATIONFAILED] Authentication failed.
why is it that i cannot log in to the account yet that is what it is in the database??And i can see it in the vmail folder
Last edited by shad2; May 29th, 2014 at 05:42 PM. Reason: clarity
You don't have authentication set up correctly for dovecot it appears. I never use databases for email accounts; I just give the users regular Unix accounts. So I'm afraid I cannot help much more with this.
You should make sure that you have either dovecot-mysql or dovecot-pgsql installed. These packages build the interface between dovecot and either MySQL or PostgreSQL respectively.
Last edited by SeijiSensei; May 29th, 2014 at 10:21 PM.
If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.
Blog · Linode System Administration Guides · Android Apps for Ubuntu Users
Oh Seiji sesei,before you let go.
this is what i have in my dovecot.conf file around that point
protocol imap {
# listen = *:10143
listen =*:143
# ssl_listen = *:10943
ssl_listen =*:993
# ..
}
protocol pop3 {
listen = *:110
ssl_listen = *:995
# listen = *:10100
# ..
pop3_uidl_format = %08Xu%08Xv
}
# protocol managesieve {
# listen = *:12000
# ..
# }
listen = *
And when I uncommented the listen as you said and tried to restart dove cot ,it said
* Restarting IMAP/POP3 mail server dovecot If you have trouble with authentication failures,
enable auth_debug setting. See http://wiki.dovecot.org/WhyDoesItNotWork
This message goes away after the first successful login.
Fatal: listen(0.0.0.0, 2000) failed: Address already in use
[fail]
Did you enable auth_debug? Did you try the solutions in that linked page?
If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.
Blog · Linode System Administration Guides · Android Apps for Ubuntu Users
yes Seijisensei, Guess what! I decided to redo all the dovecot configuration file.This time i got this error in my erorr logs:
May 31 12:45:39 bal-laptop dovecot: auth-worker(default): sql(aretab@bal-laptop.localhost,127.0.0.1): Unknown scheme SHA512-CRYPT
Can't I use this with dovecot on ubuntu 10.04 ??
by the way is there b crypt for dovecot and how can i enforce that sort of scheme?
Last edited by shad2; May 31st, 2014 at 12:02 PM. Reason: clarity
Bookmarks