w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Emails not arriving on dovecot/postfix (debian)
Can you please post the output of /var/log/mail.log ? Because as far as i think the mail.log would contain something like "could not connect to /var/run/dovecot/auth-master: permission denied". If this is the case then all you have to do is change the permissions of /var/run/dovecot/auth-master so that vmail user can access it. But there's a catch to it. Whenever dovecot is restarted the permissions are reverted. You will have to give them again or you can write a script that does that for you every time dovecot or system is restarted. If this is not the case then post the log here for more clarification.

Categories : Misc

Linux postfix/dovecot 554 Relay access denied
If you use a postfix version newer then 2.10, then you need to add the smtpd_relay_restrictions option as described here: # With Postfix 2.10 and later, the mail relay policy is # preferably specified under smtpd_relay_restrictions. /etc/postfix/main.cf: smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination # Older configurations combine relay control and spam control under # smtpd_recipient_restrictions. To use this example with Postfix ≥ # 2.10 specify "smtpd_relay_restrictions=". /etc/postfix/main.cf: smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination ...other rules... After that, any sasl authenticated user should be able to send mails through the

Categories : Linux

Cannot send AES encrypted messages of over 47 characters
This is true. AES is a block cypher, which means it encrypts 16 and only 16 bytes at a time. This means that you have to pad you message to be a multiple of 16, and call it multiple times , once for each block. For good encryption, you also need to add an IV, and to apply this to all your blocks. This can be very difficult to implement yourself, so you should let your libraries do it. The javax.crypto library can already do that. The solution is to select another algorithm, as found in the Javadocs (or consult the full list here). Try this for algo: AES/CBC/PKCS5Padding

Categories : Java

Receiving messages from and sending messages to RabbitMq from WSO2 esb (v. 4.6.0)
This is because you have not set the content type and content Encoding when sending the message. Please make sure you set the contentType and contentEncoding in the builder. builder.contentType("text/xml"); builder.contentEncoding("utf-8");

Categories : Wso2

Postfix sending mail from nonexistent email addresses
The reject_unlisted_sender restriction listed in smtpd_sender_restrictions is listed after permit_mynetworks and permit_sasl_authenticated. Postfix traverses the restriction list in order and terminates when it hits the first permit/reject and hence never reaches reject_unlisted_sender. Since your message wasn't rejected by reject_unauth_destination it must've been accepted because of permit_mynetworks or permit_sasl_authenticated. Additionally, unless the sender address you used had a domain part that was actually "owned" by Postfix (i.e. listed in mydestination, virtual_mailbox_domains, virtual_alias_domains, or relay_domains), it can't be validated and reject_unlisted_sender won't work. See details in the postconf(5) man page. Other observations: The warn_if_reject restriction is pl

Categories : Mysql

sending rc4 encrypted api call in java
You should use a byte[] not a String to hold intermediate byte array values. A String is for text, not raw data, and will attempt to decode the bytes as character data using your system's default character set (at least, the single-parameter String constructor will). Same with String.getBytes(). Just return cipherText directly from getRC4EncryptedString2(), and pass it directly to getBase64Encoded(). There's a reason those encoders operate on byte arrays, and that reason is not so that you can garble the data by applying a character encoding to it in between. The same goes for the key you are passing to getRC4EncryptedString2(). At the bare minimum use String.getBytes("ISO-8859-1") or something (assuming that your key is actually text and not yet another garbled byte array). The no-param

Categories : Java

Sending an encrypted mail with javamail using PGP
Have a look to this link, it shows how to do PGP encryption using Bouncycastle: http://fastpicket.com/blog/2012/05/14/easy-pgp-in-java-bouncy-castle/

Categories : Java

ActiveMQ stops sending messages to Queue Consumer in case of consumer not acknowledging messages
I had tried out lot of different configurations to resolve this issue by setting different activemq attributes like prefetch policy, maxpagesize etc. but none of them really helped. By referring to @Jake's comment I got to know about monitoring activemq using JMX via JConsole. This is a very handy tool to monitor and manage your activemq. Here are few article which you may find useful. 1. Monitoring activemq 2. Connecting activemq JMX using JConsole By monitoring the queue attributes I figured out that memoryLimit attribute had very low value assigned to it (just 1mb). Increasing the value of the attribute solved my issue. JMS started sending messages without waiting for acknowledgement. For testing purpose I had changed the value for memoryLimit in the conf/activemq.xml configuration

Categories : Java

Sending gratuitous ARP messages
Using scapy: from scapy.all import * SELF_MAC = '02:02:02:02:02:02' # fill in with your MAC address BCAST_MAC = 'ff:ff:ff:ff:ff:ff' def create_ARP_request_gratuituous(ipaddr_to_broadcast): arp = ARP(psrc=ipaddr_to_broadcast, hwsrc=SELF_MAC, pdst=ipaddr_to_broadcast) return Ether(dst=BCAST_MAC) / arp # and then call sendp() with the result

Categories : C

Sending syslog messages from perl
It looks like the Perl syslog module has some issues on SunOS. These issues might have been fixed but for me updating is not an option as this server is owned by another department in the company. What I ended up doing was just using the logger command line utility. This is far from ideal but does work. The code here closes the logger for each call but it could easily be kept open. The problem with keeping it open is that you can't change the severity. open(my $fh, "| logger -p $facility.$severityName"); print $fh $logmsg . " "; close($fh); The other option would be call the syslog API but I'm a bit over this and just need something that works at this stage :-)

Categories : Perl

Sending AMQP messages from an IBM Mainframe
IBM i series (AS/400) are not mainframes. They are considered a midrange machine. The IBM z series are mainframes. I regularly use Apache ActiveMQ on the IBM i. It has excellent Java support with the IBM JDK. It is my understanding that the IBM z series also has excellent Java support. IBM also offers Websphere MQ but I can't find any information on whether it supports the AMQP protocol.

Categories : Misc

Sending different error messages from web service
Try to use the exceptions. Within the java annotations cxf system you can return an exception if it looks like this : import javax.xml.ws.WebFault; @WebFault(name = "UsageMyException") public class MyException extends Exception { private static final long serialVersionUID = 1L; public MyException(final String string) { super(string); } public MyException(final Exception e) { super(e); } } You can use more than one exception that extends each other. The exception corresponds to wsdl/soap FaultMessage.

Categories : Web Services

Sending Messages From Non-Actors in Akka
Whether it's thread-safe depends on the rest of your app. Actors aren't inherently thread-safe; you can share mutable state just as you could with any application entity. But the tell call will return immediately because it's asynchronous.

Categories : Java

Random access to an encrypted file and write encrypted data into a specific offset in Android
The whole file has to be re-encrypted, with a new initialization vector, every time it is changed. Any other approach is insecure. ECB mode supports random access without re-encryption, but ECB does not satisfy the "secure" requirement per se. CBC mode does not support random access. CTR mode does support random access, but you must never use it this way, because it counts as nonce reuse, which results in plaintext recovery.

Categories : Android

Sending messages to multiple rooms using Socket.io?
The sockets.in method only accepts one room as an argument, so to broadcast to multiple rooms you would have to reset the room, in between emissions. Something like this should work: ['room1', 'room2', 'room3'].forEach(function(room){ io.sockets.in(room).emit("id", {}); });

Categories : Node Js

sending multiple messages using clickatell gateway
Have you tried $params2 = array('session_id'=>$sessionID, 'api_id' => $api_id,'user'=> $usr,'password'=>$pwd, 'to'=>array('962xxxxxxx', '962xxxxxxx', '962xxxxxxx'), 'from'=>"thetester",'text'=... or $params2 = array('session_id'=>$sessionID, 'api_id' => $api_id,'user'=> $usr,'password'=>$pwd, 'to'=>array('962xxxxxxx,962xxxxxxx,962xxxxxxx'), 'from'=>"thetester",'text'=...

Categories : PHP

PHP Email form sending blank messages
You need to return a value from your function. function clean($string) { return preg_replace('/[^a-zA-Z0-9s]/', '', strip_tags(html_entity_decode($string))); }

Categories : PHP

Sending messages to websocket server with flash
As it turns out it was just one of those bizarre bugs that happened for basically no reaseon, i ended up re-writing the section of code that manages the creation of websocket frames and frame fragmentation and it just worked. ive had a few programmers look the the two examples of code including an action script developer and none of them can work out why the one snippet works and the other doesnt. On the upside going back over the process has given me a better understanding of the protocol. If there is anyone else that has been having a similar problem feel free to get in touch and i will see if i can help you out.

Categories : Java

Websocket: sending messages over 65535 bytes fails
As I suspected, the bit-shifting code, populated over the internet does not work. Found the following code (source) : frame[1] = (byte)127; int left = length; int unit = 256; for (int i = 9; i > 1; i--) { frame[i] = (byte)(left % unit); left = left / unit; if (left == 0) break; } And it works! Although I could not figure out, what's the difference.

Categories : Java

Authentication error sending messages to Windows Service Bus 1.0 on AWS
Try with the OAuthTokenProvider and make sure that connBuilder is passing the right values. TokenProvider tokenProvider = TokenProvider.CreateOAuthTokenProvider (connBuilder.StsEndpoints, new NetworkCredential(connBuilder.WindowsCredentialUsername, connBuilder.WindowsCredentialPassword)); Once you try this, please, reply with the exception you get in your client. Also, in the server, search for a event in the Service Bus section that would give more details about the exception. With that information we should continue to the next step.

Categories : Amazon

Sails.js + socket.io: Sending messages from server to clients
The Sails way to do this would be to have a model backing your "Groups", and in a controller action have a socket subscribe to a group with Group.subscribe(groupId, req.socket). Then you can send messages to a specific group with Group.publish(groupId, data). You can also subscribe to an arbitrary room name in a controller using req.listen(groupId), and broadcast to that room with req.broadcast(roomName, data). This is all in the Sails documentation for working with Sockets!

Categories : Node Js

GCM alternative for local networks or sending messages to device IP
You should take a look at MQTT. There is also a Java library that is compatible with Android; the Eclipse Paho Client. In very simplistic terms, MQTT an asynchronous publish/subscribe mechanism that is well suited for what you want. It runs on top of TCP/IP.. You will need to use a MQTT broker on the server side (i.e. mosquitto (mosquitto.org) or RSMB (Really Small Message Broaker), etc) If you are interested, I created a simple project that allows you to connect to a Raspberry Pi and turn the lights of your house on and off using and Android device. Here is the git

Categories : Android

Sending messages to java server in objective-c via AsyncSocket
If you read the docs for writeUTF it says it writes the first 2 bytes using writeShort. This says Writes a short to the underlying output stream as two bytes, high byte first. If no exception is thrown, the counter written is incremented by 2. A byte is 8 bits, so that makes the value they are writing is 16 bits, you are using int32_t, which is 32 bits. you should be writing an int16 or int16_t (I don't objective-c).

Categories : Java

How to handle sending multiple messages over a socket connection?
You can use ObjectInputStream to read Objects instead of Strings. This way you will read only one Message(String in your case) every call to ObjectInputStream.readObject(); BTW you can read the first message, "do something" and then read the second message. you don't have to read all of the sent messages at once. If there are no other messages, then your thread will be blocked when trying to read an object from the ObjectInputStream. Use it like: ObjectInputStream inputStream = new ObjectInputStream( socket.getInputStream() )

Categories : Java

Sending messages from Python to a Pure Data patch via libPd
In python things are a bit different. Once you have the python bindings built you can look in the build folder and find pylibpd.py in the lib.YOUROPERATINGSYSTEM folder. You can see all of the def statements and what they are mapped to in libpd. The simplest sending message is this: libpd_message('recvr', 'hellooo') If you'd rather send a float then you can like this: libpd_float('recvr', 323.290) These will show up in your PD patch if you have a receive object with the argument recvr. Another good resource is the original paper on libpd. http://www.uni-weimar.de/medien/wiki/images/Embedding_Pure_Data_with_libpd.pdf

Categories : Python

What is the best way of avoiding type erasure in Scala/Akka when sending and receiving messages?
Yes, go for case classes and case objects and also put them into actors companion objects. object Printer { case class Print(name: String, details: Map[String, List[Int]) } class Printer extends Actor { import Printer._ def receive = { case Print(name, data) => println(data) case _ => println("I'm sry, what?") } }

Categories : Scala

getting warning messages while sending push notification to multiple iphone device
might seem like a dumb answer, but have you tried your firewall / iptables? Those errors without further information look like connection issues to me. First thing you need to resolve is the timeout problem.

Categories : PHP

Custom ClassLoader uses secret key to decrypt pre-encrypted class files (which had been encrypted with the secret key)
You already answered your own question: Your decrypting class loader still has to call defineClass. Anyone can launch your app launcher in their own class loader and simply hand your app launcher a version of java.lang.ClassLoader that will write out anything that is passed to defineClass. There is no way around defineClass (aside from native code, I suppose). If you are so worried about your classes being decompiled you're better off with an obfuscator (ProGuard or the like) or possibly an ahead of time native compiler (GCJ, Jet).

Categories : Java

socat how to receive large amount of messages store these messages and acknowledge each message
Although this question is quite old now, this would have worked: socat tcp-listen:5678,reuseaddr,fork 'system:echo +OK!!open:recv.data,create,append' Source: Dual inter addresses

Categories : Misc

Regarding Akka message transfer performance: many small messages or less large messages?
For messages passed in Akka on the same machine, I don't think it matters a lot whether you use small message or an aggregation of messages as single message. The additional overhead of many calls versus having to loop while processing the aggregation is minimal I think. I would prefer using small messages because it keeps the system simpler. However, when sending messages over the network Akka is using HTTP and so there is the additional HTTP overhead costs for setting up a connection etc. Therefore you might choose here to aggregate some messages into a single message. However, this also depends on your use case. Buffering implies waiting for more until there are enough (or a timeout occured). If you cannot wait, e.g. because you need fast responses, then you still need to send each mes

Categories : Performance

Django log messages not processing correctly. Messages to multiple files
You have two different loggers, named '' (the root logger) and 'auth'. The order in which your two statements appear: logger = logging.getLogger('') logger = logging.getLogger('auth') obviously makes a difference when you call logger.info(...) as in the two cases you will be calling the method on two different loggers. You might wish to change your code to root_logger = logging.getLogger('') logger = logging.getLogger('auth') and then call methods on either root_logger or logger as appropriate.

Categories : Python

Prevent p:messages component from showing messages which are already shown in p:message
i used the following JS function oncomplete of blur event and it works fine: function hideRequiredMessage(){ var ErrorMessagesSpans= document.getElementById("myform:messages").getElementsByClassName("ui-messages-error-summary"); if(ErrorMessagesSpans!=null && ErrorMessagesSpans.length > 0){ var ErrorMessageSpan=ErrorMessagesSpans[0]; if(ErrorMessageSpan.innerHTML==''){ //ErrorMessageSpan.className = ''; ErrorMessageSpan.parentNode.removeChild(ErrorMessageSpan); } } }

Categories : Validation

How to achieve complex messages using GWT i18n Messages interface
I Don't think it can be done, only for plural count and enums you can specify mutliple messages for the same method. In this case you need to create 3 methods and do the testing on the variants in your own code.

Categories : Gwt

Open iOS Messages app and go directly to the Inbox/Messages list
Unfortunately there are only two URL schemes for Messages, "sms:" , that opens the "New message" screen "sms:1-408-555-1212" , that opens the "New message" screen with the number provided As Apple developer documentation refers: https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/iPhoneURLScheme_Reference.pdf [Link updated]

Categories : IOS

jms persistent messages and order of messages obtained
If you are consuming messages in parallel, then due to the nature of threading there can never be a guarantee that they will be completed in exactly the order they were sent in - only that they will be handed off to consumers in order. If there are only certain messages that absolutely, positively must be ordered (usually related to a transaction/account), you can use Message Groups feature to associate groups with consumers - a kind of sticky load balancing. Acknowledging messages by yourself is most definitely possible, but probably not needed. The MessageListenerContainer has a acknowledge attribute which if set to transacted will result in the message only being acknowledged as consumed once the MessageListener has completed executing, without an exception being thrown. No transaction

Categories : Spring

Global messages not displaying in
As there is no template attribute in ui:composition I assume the page is top level one. Then h:body is missing, here is an example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <h:head/> <h:body> <h:form ..... </h:body> </html>

Categories : JSF

How to make p:messages keep messages until errors are fixed
Set each ajax update tag with process="@form". I suspect the reason why a validation message is displayed for only a single component at a time is that each ajax request only processes a single component. As a result, only one component will ever fail validation at a single time and only one validation message will be queued. By setting each you'll ensure that each component in the form goes thru validation during processing and their respective validators will kick in.

Categories : Validation

Use of $ in postfix expression
In this case, I am certain the operator is exponentiation. 8 3 4 + - 3 8 2 / + * 2 $ 3 + is: 8 3 4 + - = 1 3 8 2 / + = 7 1 7 * = 7 7 2 $ = 49 49 3 + = 52. Or maybe 7 2 $ = 128 128 3 + = 131. Depends on how your instructor defined the operator.

Categories : Database

PHP force transport into PostFix
Take a look at php.ini file /etc/php5/apache2/php.ini on debian: [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = localhost ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = me@example.com Uncomment sendmail_from: and set it to your needs. Make sure you do: service apache2 restart or service httpd restart to change take effect. Hope it helps, Mirko

Categories : PHP

It's possible to read email using ID on Postfix?
Try to grep /var/log/mail.log.1, /var/log/mail.log.2, etc files too. But if the email was not bounced via postfix there are no way to recover it. By default postfix keeps emails in undeliverable state (i.e bounced) within 5 days (parameter maximal_queue_lifetime).

Categories : Email



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.