You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Allen Sy <ic...@uclink.berkeley.edu> on 2003/04/09 03:19:36 UTC
Unable to send mail from James to external addresses...
Hello all,
I can't send mail to external addresses.
Windows 2000
James 2.1.2
Sun JDK 1.4.1
dnsserver.log seems to look ok.
Thanks for the help,
Allen
Relevant error from mailet.log?
-----
08/04/03 18:02:01 INFO James.Mailet: RemoteDelivery: Temporary exception
delivering mail (Mail1049850095143-25-to-uclink4.berkeley.edu:
javax.mail.MessagingException: 501 5.0.0 Invalid domain name
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:923)
at com.sun.mail.smtp.SMTPTransport.helo(SMTPTransport.java:555)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:245)
at javax.mail.Service.connect(Service.java:233)
at javax.mail.Service.connect(Service.java:134)
at javax.mail.Service.connect(Service.java:86)
at com.sun.mail.smtp.SMTPTransport.connect(SMTPTransport.java:95)
at
org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:
242)
at
org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:685)
at java.lang.Thread.run(Thread.java:536)
-----
Following is my config.xml:
-----
<?xml version="1.0"?>
<config>
<James>
<postmaster>Postmaster@localhost</postmaster>
<servernames autodetect="true" autodetectIP="true">
<!-- James will accept email for the following servers -->
<servername>localhost</servername>
</servernames>
<usernames ignoreCase="true" enableAliases="true" enableForwarding="true"/>
<!-- The inbox repository is the location for users inboxes -->
<inboxRepository>
<repository destinationURL="file://var/mail/inboxes/" type="MAIL"/>
</inboxRepository>
</James>
<spoolmanager>
<threads>10</threads>
<mailetpackages>
<mailetpackage>org.apache.james.transport.mailets</mailetpackage>
</mailetpackages>
<matcherpackages>
<matcherpackage>org.apache.james.transport.matchers</matcherpackage>
</matcherpackages>
<!-- The root processor is a required processor -->
<processor name="root">
<!-- Checks that the email Sender is associated with a valid domain. -->
<!-- Useful for detecting and eliminating spam. -->
<mailet match="SenderInFakeDomain" class="Null"/>
<!-- Important check to avoid looping -->
<mailet match="RelayLimit=30" class="Null"/>
<!-- Check for delivery from a known spam server -->
<!-- This set of matchers/mailets redirect all emails from known -->
<!-- black holes, open relays, and spam servers to the spam processor -->
<!-- For this set to function properly, the spam processor must be
configured. -->
<mailet match="InSpammerBlacklist=blackholes.mail-abuse.org" class="Null"/>
<mailet match="InSpammerBlacklist=dialups.mail-abuse.org" class="Null"/>
<mailet match="InSpammerBlacklist=relays.mail-abuse.org" class="Null"/>
<!-- Send remaining mails to the transport processor for either local or
remote delivery -->
<mailet match="All" class="ToProcessor">
<processor>transport</processor>
</mailet>
</processor>
<!-- The error processor is required. James may internally set emails to the
-->
<!-- error state. The error processor is generally invoked when there is an
-->
<!-- unexpected error either in the mailet chain or internal to James. -->
<processor name="error">
<!-- Logs any messages to the repository specified -->
<mailet match="All" class="ToRepository">
<repositoryPath>file://var/mail/error/</repositoryPath>
<passThrough>true</passThrough>
</mailet>
<!-- If you want to notify the sender their message generated an error,
uncomment this -->
<mailet match="All" class="NotifySender"/>
</processor>
<!-- Processor CONFIGURATION SAMPLE: transport is a sample custom processor
for local or -->
<!-- remote delivery -->
<processor name="transport">
<!-- Is the recipient is for a local account, deliver it locally -->
<mailet match="RecipientIsLocal" class="LocalDelivery"/>
<!-- If the host is handled by this server and it did not get -->
<!-- locally delivered, this is an invalid recipient -->
<mailet match="HostIsLocal" class="ToProcessor">
<processor>error</processor>
</mailet>
<!-- This is an anti-relay matcher/mailet combination -->
<!-- Emails sent from servers not in the network list are -->
<!-- rejected as spam. This is one method of preventing your -->
<!-- server from being used as an open relay. Make sure you understand -->
<!-- how to prevent your server from becoming an open relay before -->
<!-- changing this configuration. -->
<!-- This matcher/mailet combination must come after local delivery has -->
<!-- been performed. Otherwise local users will not be able to receive -->
<!-- email from senders not in this remote address list. -->
<!--
<mailet match="RemoteAddrNotInNetwork=127.0.0.1,12.233.62.236"
class="Null"/>
-->
<!-- Attempt remote delivery using the specified repository for the spool,
-->
<!-- using delay time to retry delivery and the maximum number of retries
-->
<mailet match="All" class="RemoteDelivery">
<outgoing>file://var/mail/outgoing/</outgoing>
<delayTime>1000</delayTime>
<!-- Number of failed attempts before returning to the sender -->
<maxRetries>5</maxRetries>
<!-- The number of threads that should be trying to deliver outgoing
messages -->
<deliveryThreads>1</deliveryThreads>
</mailet>
</processor>
<!-- Processor CONFIGURATION SAMPLE: spam is a sample custom processor for
handling -->
<!-- spam. -->
<!-- You can either log these, bounce these, or just ignore them. -->
<processor name="spam">
<!-- To destroy all messages, uncomment this matcher/mailet configuration
-->
<mailet match="All" class="Null"/>
</processor>
</spoolmanager>
<dnsserver>
<servers>
<!--Enter ip address of your DNS server, one IP address per server -->
<server>216.148.227.68</server>
<server>204.127.202.4</server>
</servers>
<authoritative>false</authoritative>
</dnsserver>
<remotemanager>
<port>4555</port>
<!-- Uncomment this if you want to use TLS (SSL) on this port -->
<useTLS>false</useTLS>
<handler>
<helloName autodetect="false">My Mail Server</helloName>
<administrator_accounts>
<account login="admin" password="admin"/>
</administrator_accounts>
<connectiontimeout>60000</connectiontimeout>
</handler>
</remotemanager>
<pop3server enabled="true">
<port>110</port>
<handler>
<!-- This is the name used by the server to identify itself in the POP3 -->
<!-- protocol. If autodetect is TRUE, the server will discover its -->
<!-- own host name and use that in the protocol. If discovery fails, -->
<!-- the value of 'localhost' is used. If autodetect is FALSE, James -->
<!-- will use the specified value. -->
<helloName autodetect="false">My Mail Server</helloName>
<connectiontimeout>120000</connectiontimeout>
</handler>
</pop3server>
<smtpserver enabled="true">
<port>25</port>
<handler>
<!-- This is the name used by the server to identify itself in the SMTP -->
<!-- protocol. If autodetect is TRUE, the server will discover its -->
<!-- own host name and use that in the protocol. If discovery fails, -->
<!-- the value of 'localhost' is used. If autodetect is FALSE, James -->
<!-- will use the specified value. -->
<helloName autodetect="false">My Mail Server</helloName>
<connectiontimeout>360000</connectiontimeout>
<verifyIdentity>true</verifyIdentity>
<authRequired>true</authRequired>
<maxmessagesize>0</maxmessagesize>
</handler>
</smtpserver>
<!-- The Mailstore block -->
<mailstore>
<repositories>
<!-- File based repositories. These repositories store all message data -->
<!-- in the file system. -->
<repository class="org.apache.james.mailrepository.AvalonMailRepository">
<protocols>
<protocol>file</protocol>
</protocols>
<types>
<type>MAIL</type>
</types>
</repository>
<repository class="org.apache.james.mailrepository.AvalonSpoolRepository">
<protocols>
<protocol>file</protocol>
</protocols>
<types>
<type>SPOOL</type>
</types>
</repository>
<!-- JDBC based repositories. These repositories store all message data -->
<!-- in the database. -->
<repository class="org.apache.james.mailrepository.JDBCMailRepository">
<protocols>
<protocol>db</protocol>
</protocols>
<types>
<type>MAIL</type>
</types>
<config>
<sqlFile>file://conf/sqlResources.xml</sqlFile>
</config>
</repository>
<repository class="org.apache.james.mailrepository.JDBCSpoolRepository">
<protocols>
<protocol>db</protocol>
</protocols>
<types>
<type>SPOOL</type>
</types>
<config>
<sqlFile>file://conf/sqlResources.xml</sqlFile>
</config>
</repository>
<!-- These repositories store message delivery and headers in the DB, and
the body to the filesystem -->
<repository class="org.apache.james.mailrepository.JDBCMailRepository">
<protocols>
<protocol>dbfile</protocol>
</protocols>
<types>
<type>MAIL</type>
</types>
<config>
<sqlFile>file://conf/sqlResources.xml</sqlFile>
<filestore>file://var/dbmail</filestore>
</config>
</repository>
<repository class="org.apache.james.mailrepository.JDBCSpoolRepository">
<protocols>
<protocol>dbfile</protocol>
</protocols>
<types>
<type>SPOOL</type>
</types>
<config>
<sqlFile>file://conf/sqlResources.xml</sqlFile>
<filestore>file://var/dbmail</filestore>
</config>
</repository>
</repositories>
<!-- Spool repository configuration -->
<!-- The spool repository is the location where incoming mails are
temporarily stored -->
<!-- before being processed. -->
<spoolRepository>
<repository destinationURL="file://var/mail/spool/" type="SPOOL"/>
</spoolRepository>
</mailstore>
<!-- The User Storage block -->
<users-store>
<repository name="LocalUsers"
class="org.apache.james.userrepository.UsersFileRepository">
<destination URL="file://var/users/"/>
</repository>
</users-store>
<!-- The database-connections block -->
<database-connections>
<!-- These connections are referred to by name elsewhere in the config file
-->
<!-- To allow James to use a database you must configure the database
connection here. -->
<!-- If you are not using a database, you can leave this section unchanged.
-->
<!-- These connections are referred to by name in URLs elsewhere in the
config file. -->
<data-sources>
<!-- James is distributed with a built in relevant copy of the mm.mysql JDBC
-->
<!-- driver. No additional driver is needed for mysql. Read the mm.mysql
LGPL -->
<!-- license at apps\james\SAR-INF\lib\mm.mysql.LICENCE
-->
<!-- JDBC driver .jar libraries for other RDBMS can be placed in ~james/lib/
-->
<!-- Example, connecting to a MySQL database called "mail" on localhost-->
<!-- -->
<!-- The max value is the maximum number of concurrent connections James
will -->
<!-- open to this database-->
<!-- If you see "SQLException: Giving up... no connections available." in
your -->
<!-- log files or bounced mail you should increase this value -->
<!--
<data-source name="maildb"
class="org.apache.james.util.mordred.JdbcDataSource">
<driver>org.gjt.mm.mysql.Driver</driver>
<dburl>jdbc:mysql://127.0.0.1/mail?autoReconnect=true</dburl>
<user>username</user>
<password>password</password>
<max>20</max>
</data-source>
-->
<!-- Example, connecting to a Microsoft MSSQL database called "mail" on
localhost-->
<!-- -->
<!-- The max value is the maximum number of concurrent connections James
will -->
<!-- open to this database-->
<!-- If you see "SQLException: Giving up... no connections available." in
your -->
<!-- log files or bounced mail you should increase this value -->
<!--
<data-source name="maildb"
class="org.apache.james.util.mordred.JdbcDataSource">
<driver>com.inet.tds.TdsDriver</driver>
<dburl>jdbc:inetdae7:127.0.0.1?database=James</dburl>
<user>sa_james</user>
<password>blahblah</password>
<max>20</max>
</data-source>
-->
</data-sources>
</database-connections>
<!-- The Object Storage block -->
<!-- Defines file storage details that are used for file-based repositories.
-->
<objectstorage>
<repositories>
<repository
class="org.apache.james.mailrepository.filepair.File_Persistent_Object_Reposit
ory">
<protocols>
<protocol>file</protocol>
</protocols>
<types>
<type>OBJECT</type>
</types>
<models>
<model>SYNCHRONOUS</model>
<model>ASYNCHRONOUS</model>
<model>CACHE</model>
</models>
</repository>
<repository
class="org.apache.james.mailrepository.filepair.File_Persistent_Stream_Reposit
ory">
<protocols>
<protocol>file</protocol>
</protocols>
<types>
<type>STREAM</type>
</types>
<models>
<model>SYNCHRONOUS</model>
<model>ASYNCHRONOUS</model>
<model>CACHE</model>
</models>
</repository>
</repositories>
</objectstorage>
<connections>
<idle-timeout>300000</idle-timeout>
<max-connections>30</max-connections>
</connections>
<sockets>
<server-sockets>
<factory name="plain"
class="org.apache.avalon.cornerstone.blocks.sockets.DefaultServerSocketFactory
"/>
</server-sockets>
<client-sockets>
<factory name="plain"
class="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketFactory"/>
</client-sockets>
</sockets>
<thread-manager>
<thread-group>
<name>default</name>
<priority>5</priority>
<is-daemon>false</is-daemon>
<max-threads>100</max-threads>
<min-threads>20</min-threads>
<min-spare-threads>20</min-spare-threads>
</thread-group>
</thread-manager>
</config>
-----
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
RE: Unable to send mail from James to external addresses...
Posted by Allen Sy <ic...@uclink4.berkeley.edu>.
I'm not using the RemoteAddrNotInNetwork matcher. Is there a reason I
should be?
(there's stuff about open relays, but as of right now I can't send to
external
addresses, so that's pretty much a non-issue) Also, is IPv6 an issue at
this point?
Allen
-----Original Message-----
From: tobe [mailto:torbjorn.gannholm@swipnet.se]
Sent: Saturday, April 12, 2003 5:35 PM
To: James Users List
Subject: Re: Unable to send mail from James to external addresses...
I just experimented a bit today and ran into the same problem. Mail to
local accounts worked, but not mail to external accounts.
It turns out that RemoteAddrNotInNetwork=127.0.0.1 was the problem
because localhost was resolving as the IPv6 address 0:0:0:0:0:0:0:1
instead of 127.0.0.1
When I changed to RemoteAddrNotInNetwork=127.0.0.1,0:0:0:0:0:0:0:1
instead, things worked fine.
/tobe
Allen Sy wrote:
>I'm able to browse the Web, and can ping servers by their hostnames.
Beyond
>that I don't know how to test DNS servers. As far as config.xml goes, does
>it look ok?
>
>Allen
>
>-----Original Message-----
>From: Noel J. Bergman [mailto:noel@devtech.com]
>Sent: Tuesday, April 08, 2003 6:49 PM
>To: James Users List
>Cc: Allen Sy
>Subject: RE: Unable to send mail from James to external addresses...
>
>
>
>
>>08/04/03 18:02:01 INFO James.Mailet: RemoteDelivery: Temporary exception
>>delivering mail (Mail1049850095143-25-to-uclink4.berkeley.edu:
>>javax.mail.MessagingException: 501 5.0.0 Invalid domain name
>>
>>
>
>Seems to work for me, even pointing at your DNS servers. Are you having
>trouble contacting those DNS servers?
>
> --- Noel
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
Re: Unable to send mail from James to external addresses...
Posted by tobe <to...@swipnet.se>.
I just experimented a bit today and ran into the same problem. Mail to
local accounts worked, but not mail to external accounts.
It turns out that RemoteAddrNotInNetwork=127.0.0.1 was the problem
because localhost was resolving as the IPv6 address 0:0:0:0:0:0:0:1
instead of 127.0.0.1
When I changed to RemoteAddrNotInNetwork=127.0.0.1,0:0:0:0:0:0:0:1
instead, things worked fine.
/tobe
Allen Sy wrote:
>I'm able to browse the Web, and can ping servers by their hostnames. Beyond
>that I don't know how to test DNS servers. As far as config.xml goes, does
>it look ok?
>
>Allen
>
>-----Original Message-----
>From: Noel J. Bergman [mailto:noel@devtech.com]
>Sent: Tuesday, April 08, 2003 6:49 PM
>To: James Users List
>Cc: Allen Sy
>Subject: RE: Unable to send mail from James to external addresses...
>
>
>
>
>>08/04/03 18:02:01 INFO James.Mailet: RemoteDelivery: Temporary exception
>>delivering mail (Mail1049850095143-25-to-uclink4.berkeley.edu:
>>javax.mail.MessagingException: 501 5.0.0 Invalid domain name
>>
>>
>
>Seems to work for me, even pointing at your DNS servers. Are you having
>trouble contacting those DNS servers?
>
> --- Noel
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
RE: Unable to send mail from James to external addresses...
Posted by Allen Sy <ic...@uclink4.berkeley.edu>.
I'm able to browse the Web, and can ping servers by their hostnames. Beyond
that I don't know how to test DNS servers. As far as config.xml goes, does
it look ok?
Allen
-----Original Message-----
From: Noel J. Bergman [mailto:noel@devtech.com]
Sent: Tuesday, April 08, 2003 6:49 PM
To: James Users List
Cc: Allen Sy
Subject: RE: Unable to send mail from James to external addresses...
> 08/04/03 18:02:01 INFO James.Mailet: RemoteDelivery: Temporary exception
> delivering mail (Mail1049850095143-25-to-uclink4.berkeley.edu:
> javax.mail.MessagingException: 501 5.0.0 Invalid domain name
Seems to work for me, even pointing at your DNS servers. Are you having
trouble contacting those DNS servers?
--- Noel
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
RE: Unable to send mail from James to external addresses...
Posted by "Noel J. Bergman" <no...@devtech.com>.
> 08/04/03 18:02:01 INFO James.Mailet: RemoteDelivery: Temporary exception
> delivering mail (Mail1049850095143-25-to-uclink4.berkeley.edu:
> javax.mail.MessagingException: 501 5.0.0 Invalid domain name
Seems to work for me, even pointing at your DNS servers. Are you having
trouble contacting those DNS servers?
--- Noel
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org