aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2007-11-24 01:13:15 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2007-11-24 01:13:15 +0000
commit3a80471931642374f323e284ce3a5a04b5635a96 (patch)
treedd887df45ac2e1eccac5dc7ba821a5b3af424734
parent77bfd077778c30c70f791752ce3a13d537aedd3b (diff)
(Hopefully) fixing one case where the Jabber module doesn't understand a
<presence type=unavailable> tag properly and keeps showing the buddy as on-line. (When the tag comes from a bare JID.)
-rw-r--r--protocols/jabber/presence.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c
index 71a044b5..5abdc449 100644
--- a/protocols/jabber/presence.c
+++ b/protocols/jabber/presence.c
@@ -87,7 +87,7 @@ xt_status jabber_pkt_presence( struct xt_node *node, gpointer data )
}
else if( strcmp( type, "unavailable" ) == 0 )
{
- if( ( bud = jabber_buddy_by_jid( ic, from, GET_BUDDY_EXACT ) ) == NULL )
+ if( ( bud = jabber_buddy_by_jid( ic, from, 0 ) ) == NULL )
{
if( set_getbool( &ic->irc->set, "debug" ) )
imcb_log( ic, "WARNING: Received presence information from unknown JID: %s", from );
@@ -100,7 +100,13 @@ xt_status jabber_pkt_presence( struct xt_node *node, gpointer data )
jabber_chat_pkt_presence( ic, bud, node );
}
- jabber_buddy_remove( ic, from );
+ if( strchr( from, '/' ) == NULL )
+ /* Sometimes servers send a type="unavailable" from a
+ bare JID, which should mean that suddenly all
+ resources for this JID disappeared. */
+ jabber_buddy_remove_bare( ic, from );
+ else
+ jabber_buddy_remove( ic, from );
if( is_chat )
{
1.0.22 Unnamed repository; edit this file 'description' to name the repository.MimesBrønn
aboutsummaryrefslogtreecommitdiffstats
path: root/doc/INSTALL-postfix.md
blob: 70a2954bd27ac4c8733e54142d9a0892320f3100 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
As an example of how to set up your MTA, in postfix on Ubuntu, you might
add the following to its configuration.

In /etc/postfix/master.cf:

  alaveteli unix  -	n	n	-	50	pipe
    flags=R user=ALAVETELI_USER argv=ALAVETELI_HOME/script/mailin

In /etc/postfix/main.cf

  virtual_alias_maps = regexp:/etc/postfix/regexp

For example

ALAVETELI_HOME=/path/to/alaveteli/software
ALAVETELI_USER=www-data

The user ALAVETELI_USER should have write permissions on ALAVETELI_HOME.

And, assuming you set `OPTION_INCOMING_EMAIL_PREFIX` in your config at
`config/general` to "foi+", create `/etc/postfix/regexp` with the following
content:

  /^foi.*/	alaveteli


You should also configure postfix to discard any messages sent to the `BLACKHOLE_PREFIX`
address, whose default value is 'do-not-reply-to-this-address'. For example, add the
following to /etc/aliases:

    # We use this for envelope from for some messages where we don't care about delivery
    do-not-reply-to-this-address:        :blackhole:

# Troubleshooting

To test mail delivery, run:
  
  $ /usr/sbin/sendmail -bv foi+requrest-1234@localhost

This tells you if sending the emails to 'foi\+.*localhost' is working.